lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [3/3] lucenenet git commit: build/build.ps1: Fixed issue with version comparison when it is a pre-release
Date Sun, 10 Sep 2017 22:02:34 GMT
build/build.ps1: Fixed issue with version comparison when it is a pre-release


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

Branch: refs/heads/master
Commit: 84fdac04ca2da3633683c04d82362e55595cfff6
Parents: 1191c20
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Mon Sep 11 05:01:20 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Mon Sep 11 05:01:20 2017 +0700

----------------------------------------------------------------------
 build/build.ps1 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/84fdac04/build/build.ps1
----------------------------------------------------------------------
diff --git a/build/build.ps1 b/build/build.ps1
index c05495a..9592b44 100644
--- a/build/build.ps1
+++ b/build/build.ps1
@@ -61,16 +61,16 @@ task Clean -description "This task cleans up the build directory" {
 
 task InstallSDK2 -description "This task makes sure the correct SDK version is installed
to build and run .NET Core 2.0 tests" {
 	& where.exe dotnet.exe
-	$sdkVersion = [version]"0.0.0.0"
+	$sdkVersion = "0.0.0.0"
 
 	if ($LASTEXITCODE -eq 0) {
-		$sdkVersion = [version][string]((& dotnet.exe --version) | Out-String).Trim()
+		$sdkVersion = [string]((& dotnet.exe --version) | Out-String).Trim()
 	}
 
 	Write-Host "Current SDK version: $sdkVersion" -ForegroundColor Yellow
 
 	# Make sure framework for .NET Core 2.0.0 is available
-	if (($sdkVersion -lt ([version]"2.0.0")) -or ($sdkVersion -ge ([version]"3.0.0"))) {
+	if (($sdkVersion.Contains("-")) -or ([version]$sdkVersion -lt ([version]"2.0.0")) -or ([version]$sdkVersion
-ge ([version]"3.0.0"))) {
 		Write-Host "Requires SDK version 2.0.0 or greater, installing..." -ForegroundColor Red
 		Invoke-Expression "$base_directory\build\dotnet-install.ps1 -Version 2.0.0"
 	}


Mime
View raw message