-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fail fast on build failures of TestPlatform.sln #1243
Conversation
smadala
commented
Oct 30, 2017
•
edited
Loading
edited
- Build should fail if there is error in build or publish steps.
- Build wasn't failing with latest dotnet-cli due to this, But it was failing in "test" step.
scripts/build.ps1
Outdated
@@ -190,6 +190,10 @@ function Invoke-Build | |||
& $dotnetExe build $TPB_Solution --configuration $TPB_Configuration -v:minimal -p:Version=$TPB_Version -p:CIBuild=$TPB_CIBuild -p:LocalizedBuild=$TPB_LocalizedBuild | |||
Write-Log ".. .. Build: Complete." | |||
|
|||
if ($lastExitCode -ne 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move the logic to check to $lastExitCode to Set-ScriptFailed function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
scripts/build.ps1
Outdated
@@ -604,8 +602,12 @@ function Get-ElapsedTime([System.Diagnostics.Stopwatch] $timer) | |||
return $timer.Elapsed | |||
} | |||
|
|||
function Set-ScriptFailed | |||
function Set-ScriptFailed-OnError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: function name doesn't match the Powershell naming convention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed.