Browse Source

Fix build scripts

Oren Novotny 8 years ago
parent
commit
fa79893ea1
2 changed files with 13 additions and 5 deletions
  1. 10 2
      Ix.NET/Source/build-new.ps1
  2. 3 3
      Rx.NET/Source/build-new.ps1

+ 10 - 2
Ix.NET/Source/build-new.ps1

@@ -51,8 +51,13 @@ msbuild "$scriptPath\Ix.NET.sln" /m /t:restore /p:Configuration=$configuration
 
 Write-Host "Building $scriptPath\Ix.NET.sln" -Foreground Green
 msbuild "$scriptPath\Ix.NET.sln" /m /t:build /p:Configuration=$configuration 
-
-
+if ($LastExitCode -ne 0) { 
+        Write-Host "Error with build" -Foreground Red
+        if($isAppVeyor) {
+          $host.SetShouldExit($LastExitCode)
+          exit $LastExitCode
+        }  
+}
 
 
 Write-Host "Building Packages" -Foreground Green
@@ -74,6 +79,7 @@ if($hasSignClientSecret) {
         Write-Host "Error signing $nupkg" -Foreground Red
         if($isAppVeyor) {
           $host.SetShouldExit($LastExitCode)
+          exit $LastExitCode
         }  
     }
     Write-Host "Finished signing $nupkg"
@@ -96,6 +102,7 @@ if ($LastExitCode -ne 0) {
 	Write-Host "Error with tests" -Foreground Red
 	if($isAppVeyor) {
 	  $host.SetShouldExit($LastExitCode)
+	  exit $LastExitCode
 	}  
 }
 
@@ -106,6 +113,7 @@ if ($LastExitCode -ne 0) {
 	Write-Host "Error with tests" -Foreground Red
 	if($isAppVeyor) {
 	  $host.SetShouldExit($LastExitCode)
+	  exit $LastExitCode
 	}  
 }
 

+ 3 - 3
Rx.NET/Source/build-new.ps1

@@ -52,12 +52,12 @@ msbuild "$scriptPath\System.Reactive.sln" /m /t:restore /p:Configuration=$config
 msbuild "$scriptPath\System.Reactive.sln" /m /t:restore /p:Configuration=$configuration
 
 Write-Host "Building $scriptPath\System.Reactive.sln" -Foreground Green
-msbuild "$scriptPath\System.Reactive.sln" /t:build /p:Configuration=$configuration 
+msbuild "$scriptPath\System.Reactive.sln" /t:build /m /p:Configuration=$configuration 
 if ($LastExitCode -ne 0) { 
         Write-Host "Error with build" -Foreground Red
         if($isAppVeyor) {
           $host.SetShouldExit($LastExitCode)
-	  exit $LastExitCode
+          exit $LastExitCode
         }  
 }
 
@@ -93,7 +93,7 @@ if($hasSignClientSecret) {
         Write-Host "Error signing $nupkg" -Foreground Red
         if($isAppVeyor) {
           $host.SetShouldExit($LastExitCode)
-	  exit $LastExitCode
+          exit $LastExitCode
         }  
     }
     Write-Host "Finished signing $nupkg"