11$scriptPath = split-path - parent $MyInvocation.MyCommand.Definition
22
3- $configuration = " Release "
3+ $configuration = $ Env: BuildConfiguration
44
5- $isAppVeyor = (( Test-Path - Path env:\APPVEYOR) -Or ( Test-Path - Path env:\ TF_BUILD))
5+ $isCloudBuild = Test-Path - Path env:\TF_BUILD
66$outputLocation = Join-Path $scriptPath " testResults"
77$openCoverPath = " .\packages\OpenCover\tools\OpenCover.Console.exe"
88$xUnitConsolePath = " .\packages\xunit.runner.console\tools\net452\xunit.console.exe"
@@ -46,7 +46,7 @@ Write-Host "Building $scriptPath\System.Reactive.sln" -Foreground Green
4646msbuild " $scriptPath \System.Reactive.sln" / restore / t:build / m / p:Configuration= $configuration / p:CreatePackage= true / p:NoPackageAnalysis= true
4747if ($LastExitCode -ne 0 ) {
4848 Write-Host " Error with build" - Foreground Red
49- if ($isAppVeyor ) {
49+ if ($isCloudBuild ) {
5050 $host.SetShouldExit ($LastExitCode )
5151 exit $LastExitCode
5252 }
@@ -68,7 +68,7 @@ if($hasSignClientSecret) {
6868
6969 if ($LastExitCode -ne 0 ) {
7070 Write-Host " Error signing $nupkg " - Foreground Red
71- if ($isAppVeyor ) {
71+ if ($isCloudBuild ) {
7272 $host.SetShouldExit ($LastExitCode )
7373 exit $LastExitCode
7474 }
@@ -91,14 +91,14 @@ $dotnet = "$env:ProgramFiles\dotnet\dotnet.exe"
9191
9292if ($LastExitCode -ne 0 ) {
9393 Write-Host " Error with tests" - Foreground Red
94- if ($isAppVeyor ) {
94+ if ($isCloudBuild ) {
9595 $host.SetShouldExit ($LastExitCode )
9696 exit $LastExitCode
9797 }
9898}
9999
100100# Either display or publish the results
101- if ($isAppVeyor -eq ' True' )
101+ if ($isCloudBuild -eq ' True' )
102102{
103103 .\packages\coveralls.io.dotcover\tools\coveralls.net.exe -f - p DotCover " $outputFile "
104104}
0 commit comments