From 70ad35ebb6a9ce7372b43909c01dff96c16b53b4 Mon Sep 17 00:00:00 2001 From: eugene yokota Date: Fri, 7 Apr 2017 22:13:12 -0700 Subject: [PATCH] Minor Windows fixes --- build.sbt | 3 ++- src/universal/bin/sbt.bat | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/build.sbt b/build.sbt index b2946b37c..53c5f8b3c 100644 --- a/build.sbt +++ b/build.sbt @@ -102,11 +102,12 @@ val root = (project in file(".")). rpmProvides := Seq("sbt"), // WINDOWS SPECIFIC - windowsBuildId := 1, + windowsBuildId := 0, version in Windows := { val bid = windowsBuildId.value val sv = sbtVersionToRelease (sv split "[^\\d]" filterNot (_.isEmpty)) match { + case Array(major,minor,bugfix, _*) if bid == 0 => Seq(major, minor, bugfix) mkString "." case Array(major,minor,bugfix, _*) => Seq(major, minor, bugfix, bid.toString) mkString "." case Array(major,minor) => Seq(major, minor, "0", bid.toString) mkString "." case Array(major) => Seq(major, "0", "0", bid.toString) mkString "." diff --git a/src/universal/bin/sbt.bat b/src/universal/bin/sbt.bat index dd85d29bf..0bf79a0c7 100644 --- a/src/universal/bin/sbt.bat +++ b/src/universal/bin/sbt.bat @@ -11,6 +11,7 @@ @echo off set SBT_HOME=%~dp0 +set SBT_ARGS= rem FIRST we load the config file of extra options. set FN=%SBT_HOME%\..\conf\sbtconfig.txt @@ -95,19 +96,18 @@ goto :eof :process rem parses 1.7, 1.8, 9, etc out of java version "1.8.0_91" -"%_JAVACMD%" -Xmx512M -version 2> "%TEMP%.\out.txt" +"%_JAVACMD%" -Xmx512M -version 2> "%TEMP%\out.txt" set JAVA_VERSION=0 -findstr /c:"version \"9" "%TEMP%.\out.txt" +>nul findstr /c:"version \"9" "%TEMP%\out.txt" if /I %ERRORLEVEL% EQU 0 (set JAVA_VERSION=9) -findstr /c:"version \"1.8" "%TEMP%.\out.txt" +>nul findstr /c:"version \"1.8" "%TEMP%\out.txt" if /I %ERRORLEVEL% EQU 0 (set JAVA_VERSION=1.8) -findstr /c:"version \"1.7" "%TEMP%.\out.txt" +>nul findstr /c:"version \"1.7" "%TEMP%\out.txt" if /I %ERRORLEVEL% EQU 0 (set JAVA_VERSION=1.7) -findstr /c:"version \"1.6" "%TEMP%.\out.txt" +>nul findstr /c:"version \"1.6" "%TEMP%\out.txt" if /I %ERRORLEVEL% EQU 0 (set JAVA_VERSION=1.6) -findstr /c:"version \"1.5" "%TEMP%.\out.txt" +>nul findstr /c:"version \"1.5" "%TEMP%\out.txt" if /I %ERRORLEVEL% EQU 0 (set JAVA_VERSION=1.5) - exit /B 0 :checkjava