Hi,
I have put together a PSake (v2.0) build script, and the script is setting the $psake.build_success
property as true
even thought the call to MSBuild fails. Can anyone advise me on how to alter the script so that the $psake.build_success
property will correctly return false
when the MSBuild call fails?
My PSake build script is as follows:
properties {
$solutionFile = 'SOLUTION_FILE'
$buildSuccessfulMessage = 'Solution Successfully Built!'
$buildFailureMessage = 'Solution Failed to Build!'
$cleanMessage = 'Executed Clean!'
}
task default -depends BuildSolution
task BuildSolution
{
msbuild $solutionFile /t:Clean,Build
if ($psake.build_success)
{
$buildSuccessfulMessage
}
else
{
$buildFailureMessage
}
}