fix build showing success on failing project

This commit is contained in:
Krzysztof Wicher 2015-11-23 19:43:02 -08:00
parent d91a4f32e6
commit 1eee5114a4
3 changed files with 57 additions and 0 deletions

View file

@ -33,9 +33,22 @@ if (!$env:DOTNET_BUILD_VERSION) {
Write-Host -ForegroundColor Green "*** Building dotnet tools version $($env:DOTNET_BUILD_VERSION) - $Configuration ***"
& "$PSScriptRoot\compile.ps1" -Configuration:$Configuration
if (!$?) {
Write-Host "Building dotnet tools finished with errors."
Exit 1
}
Write-Host -ForegroundColor Green "*** Packaging dotnet ***"
& "$PSScriptRoot\package\package.ps1"
if (!$?) {
Write-Host "Packaging dotnet finished with errors."
Exit 1
}
Write-Host -ForegroundColor Green "*** Generating dotnet MSI ***"
& "$RepoRoot\packaging\windows\generatemsi.ps1" $Stage2Dir
if (!$?) {
Write-Host "Generating dotnet MSI finished with errors."
Exit 1
}

View file

@ -48,10 +48,19 @@ $RuntimeOutputDir = "$OutputDir\runtime\coreclr"
# Publish each project
$Projects | ForEach-Object {
dotnet publish --framework "$Tfm" --runtime "$Rid" --output "$OutputDir\bin" --configuration "$Configuration" "$RepoRoot\src\$_"
if (!$?) {
Write-Host Command failed: dotnet publish --framework "$Tfm" --runtime "$Rid" --output "$OutputDir\bin" --configuration "$Configuration" "$RepoRoot\src\$_"
exit 1
}
}
# Publish the runtime
dotnet publish --framework "$Tfm" --runtime "$Rid" --output "$RuntimeOutputDir" --configuration "$Configuration" "$RepoRoot\src\Microsoft.DotNet.Runtime"
if (!$?) {
Write-Host Command failed: dotnet publish --framework "$Tfm" --runtime "$Rid" --output "$RuntimeOutputDir" --configuration "$Configuration" "$RepoRoot\src\Microsoft.DotNet.Runtime"
Exit 1
}
# Clean up bogus additional files
$FilesToClean | ForEach-Object {

View file

@ -26,6 +26,11 @@ Download it from https://www.cmake.org
# Install a stage 0
header "Installing dotnet stage 0"
& "$PSScriptRoot\install.ps1"
if (!$?) {
Write-Host "Command failed: $PSScriptRoot\install.ps1"
Exit 1
}
# Put stage 0 on the path
$DotNetTools = $env:DOTNET_INSTALL_DIR
@ -47,6 +52,11 @@ Download it from https://www.cmake.org
# Restore packages
header "Restoring packages"
dotnet restore "$RepoRoot" --quiet --runtime "osx.10.10-x64" --runtime "ubuntu.14.04-x64" --runtime "win7-x64" --no-cache
if (!$?) {
Write-Host "Command failed: " dotnet restore "$RepoRoot" --quiet --runtime "osx.10.10-x64" --runtime "ubuntu.14.04-x64" --runtime "win7-x64" --no-cache
Exit 1
}
header "Building corehost"
pushd "$RepoRoot\src\corehost"
@ -78,15 +88,30 @@ Download it from https://www.cmake.org
# Build Stage 1
header "Building stage1 dotnet using downloaded stage0 ..."
& "$PSScriptRoot\build\build-stage.ps1" -Tfm:$Tfm -Rid:$Rid -Configuration:$Configuration -OutputDir:$Stage1Dir -RepoRoot:$RepoRoot -HostDir:$HostDir
if (!$?) {
Write-Host "Command failed: $PSScriptRoot\build\build-stage.ps1" -Tfm:$Tfm -Rid:$Rid -Configuration:$Configuration -OutputDir:$Stage1Dir -RepoRoot:$RepoRoot -HostDir:$HostDir
Exit 1
}
# Build Stage 2 using Stage 1
$env:PATH = "$Stage1Dir\bin;$StartPath"
header "Building stage2 dotnet using just-built stage1 ..."
& "$PSScriptRoot\build\build-stage.ps1" -Tfm:$Tfm -Rid:$Rid -Configuration:$Configuration -OutputDir:$Stage2Dir -RepoRoot:$RepoRoot -HostDir:$HostDir
if (!$?) {
Write-Host "Command failed: $PSScriptRoot\build\build-stage.ps1" -Tfm:$Tfm -Rid:$Rid -Configuration:$Configuration -OutputDir:$Stage2Dir -RepoRoot:$RepoRoot -HostDir:$HostDir
Exit 1
}
# Crossgen Roslyn
header "Crossgening Roslyn compiler ..."
cmd /c "$PSScriptRoot\crossgen\crossgen_roslyn.cmd" "$Stage2Dir"
if (!$?) {
Write-Host "Command failed: " cmd /c "$PSScriptRoot\crossgen\crossgen_roslyn.cmd" "$Stage2Dir"
Exit 1
}
# Copy dnx into stage 2
cp -rec "$DnxDir\" "$Stage2Dir\bin\dnx\"
@ -98,10 +123,20 @@ Download it from https://www.cmake.org
$env:PATH = "$Stage2Dir\bin;$StartPath"
header "Acquiring Native App Dependencies"
cmd /c "$PSScriptRoot\build\build_appdeps.cmd" "$Stage2Dir"
if (!$?) {
Write-Host "Command failed: " cmd /c "$PSScriptRoot\build\build_appdeps.cmd" "$Stage2Dir"
Exit 1
}
# Smoke test stage2
$env:DOTNET_HOME = "$Stage2Dir"
& "$PSScriptRoot\test\smoke-test.ps1"
if (!$?) {
Write-Host "Command failed: $PSScriptRoot\test\smoke-test.ps1"
Exit 1
}
} finally {
$env:PATH = $StartPath
$env:DOTNET_HOME = $StartDotNetHome