File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
src/PostSharp.Engineering.BuildTools/Resources Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -112,11 +112,13 @@ if (-not $env:IS_TEAMCITY_AGENT -and -not $NoClean)
112112 Write-Host " Cleaning up." - ForegroundColor Green
113113 if (Test-Path " artifacts" )
114114 {
115- Remove-Item artifacts - Force - Recurse - ProgressAction SilentlyContinue
115+ Remove-Item artifacts - Force - Recurse - ErrorAction SilentlyContinue
116116 }
117- Get-ChildItem @ (" bin" , " obj" ) - Recurse | Remove-Item - Force - Recurse - ProgressAction SilentlyContinue
117+ Get-ChildItem " bin" - Recurse | Remove-Item - Force - Recurse - ErrorAction SilentlyContinue
118+ Get-ChildItem " obj" - Recurse | Remove-Item - Force - Recurse - ErrorAction SilentlyContinue
118119}
119120
121+ Write-Host " Preparing context and mounts." - ForegroundColor Green
120122# Create secrets JSON file.
121123if (-not $KeepEnv )
122124{
@@ -299,9 +301,9 @@ if (-not $BuildImage)
299301 $dockerArgsAsString = $dockerArgs -join " "
300302
301303
302- Write-Host " Executing: `` docker run --rm --memory=12g $VolumeMappingsAsString -w $SourceDirName $dockerArgsAsString $ImageName pwsh $pwshArgs -Command `" & .\Build.ps1 $buildArgsString `"`` ." - ForegroundColor Cyan
304+ Write-Host " Executing: `` docker run --rm --memory=12g $VolumeMappingsAsString -w $SourceDirName $dockerArgsAsString $ImageName pwsh $pwshArgs -Command `" & .\Build.ps1 $buildArgsString `; exit `$ LASTEXITCODE ` "`` ." - ForegroundColor Cyan
303305
304- docker run -- rm -- memory= 12g @VolumeMappings - w $SourceDirName @dockerArgs $ImageName pwsh $pwshArgs - Command " & .\Build.ps1 $buildArgsString "
306+ docker run -- rm -- memory= 12g @VolumeMappings - w $SourceDirName @dockerArgs $ImageName pwsh $pwshArgs - Command " & .\Build.ps1 $buildArgsString `; exit `$ LASTEXITCODE; "
305307 if ($LASTEXITCODE -ne 0 )
306308 {
307309 Write-Host " Docker run (build) failed with exit code $LASTEXITCODE " - ForegroundColor Red
Original file line number Diff line number Diff line change @@ -301,9 +301,9 @@ if (-not $BuildImage)
301301 $dockerArgsAsString = $dockerArgs -join " "
302302
303303
304- Write-Host " Executing: `` docker run --rm --memory=12g $VolumeMappingsAsString -w $SourceDirName $dockerArgsAsString $ImageName pwsh $pwshArgs -Command `" & .\Build.ps1 $buildArgsString `"`` ." - ForegroundColor Cyan
304+ Write-Host " Executing: `` docker run --rm --memory=12g $VolumeMappingsAsString -w $SourceDirName $dockerArgsAsString $ImageName pwsh $pwshArgs -Command `" & .\Build.ps1 $buildArgsString `; exit `$ LASTEXITCODE ` "`` ." - ForegroundColor Cyan
305305
306- docker run -- rm -- memory= 12g @VolumeMappings - w $SourceDirName @dockerArgs $ImageName pwsh $pwshArgs - Command " & .\Build.ps1 $buildArgsString "
306+ docker run -- rm -- memory= 12g @VolumeMappings - w $SourceDirName @dockerArgs $ImageName pwsh $pwshArgs - Command " & .\Build.ps1 $buildArgsString `; exit `$ LASTEXITCODE; "
307307 if ($LASTEXITCODE -ne 0 )
308308 {
309309 Write-Host " Docker run (build) failed with exit code $LASTEXITCODE " - ForegroundColor Red
You can’t perform that action at this time.
0 commit comments