lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject lucenenet git commit: build/build.ps1: Added logic to fail the build when SDK installation fails. Setup scenario that will fail (non-existent SDK version) to test it with.
Date Sun, 10 Sep 2017 14:11:05 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master 16ec7cd4a -> c02a98da4


build/build.ps1: Added logic to fail the build when SDK installation fails. Setup scenario
that will fail (non-existent SDK version) to test it with.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/c02a98da
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/c02a98da
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/c02a98da

Branch: refs/heads/master
Commit: c02a98da4a2c91d5ad205722e98ae096fafe8ce1
Parents: 16ec7cd
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Sep 10 21:10:55 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Sep 10 21:10:55 2017 +0700

----------------------------------------------------------------------
 build/build.ps1 | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c02a98da/build/build.ps1
----------------------------------------------------------------------
diff --git a/build/build.ps1 b/build/build.ps1
index ad0ca63..c303a01 100644
--- a/build/build.ps1
+++ b/build/build.ps1
@@ -72,14 +72,20 @@ task InstallSDK -description "This task makes sure the correct SDK version
is in
 	if (!$sdkVersion.Equals("1.0.4")) {
 		Write-Host "Require SDK version 1.0.4, installing..." -ForegroundColor Red
 		#Install the correct version of the .NET SDK for this build
-	    Invoke-Expression "$base_directory\build\dotnet-install.ps1 -Version 1.0.4"
+	    $success = Invoke-Expression "$base_directory\build\dotnet-install.ps1 -Version 1.0.5;$?"
+		if (-not $success) {
+			throw "The .NET Core 1.0.4 SDK failed to install."
+		}
 	}
 
 	# Make sure framework for .NET Core 2.0.0 is available
 	if (!$sdkVersion.Equals("2.0.0")) {
 		Write-Host "Require SDK version 2.0.0, installing..." -ForegroundColor Red
 		#Install the correct version of the .NET SDK for this build
-	    Invoke-Expression "$base_directory\build\dotnet-install.ps1 -Version 2.0.0"
+	    $success = Invoke-Expression "$base_directory\build\dotnet-install.ps1 -Version 2.0.0;$?"
+		if (-not $success) {
+			throw "The .NET Core 2.0.0 SDK failed to install."
+		}
 	}
 
 	# Safety check - this should never happen


Mime
View raw message