mirror of https://github.com/sbt/sbt.git
Merge pull request #307 from er1c/script-version-no-copy
Update sbt.bat --script-version to execute early and avoid java check/robocopy bootstrap
This commit is contained in:
commit
031021cea0
|
|
@ -1 +1 @@
|
||||||
sbt.version=1.3.0-M4
|
sbt.version=1.3.0
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@ object SbtRunnerTest extends SimpleTestSuite with PowerAssertions {
|
||||||
}
|
}
|
||||||
|
|
||||||
test("sbt --script-version should print sbtVersion") {
|
test("sbt --script-version should print sbtVersion") {
|
||||||
val out = sbtProcessWithOpts("--numeric-version", "", "").!!.trim
|
val out = sbtProcessWithOpts("--script-version", "", "").!!.trim
|
||||||
val expectedVersion = "^"+versionRegEx+"$"
|
val expectedVersion = "^"+versionRegEx+"$"
|
||||||
assert(out.matches(expectedVersion))
|
assert(out.matches(expectedVersion))
|
||||||
()
|
()
|
||||||
|
|
|
||||||
|
|
@ -459,8 +459,6 @@ goto args_loop
|
||||||
rem Confirm a user's intent if the current directory does not look like an sbt
|
rem Confirm a user's intent if the current directory does not look like an sbt
|
||||||
rem top-level directory and the "new" command was not given.
|
rem top-level directory and the "new" command was not given.
|
||||||
|
|
||||||
rem TODO: if not -sbt-create
|
|
||||||
|
|
||||||
if not defined sbt_args_sbt_create if not defined sbt_args_print_version if not defined sbt_args_print_sbt_version if not defined sbt_args_print_sbt_script_version if not exist build.sbt (
|
if not defined sbt_args_sbt_create if not defined sbt_args_print_version if not defined sbt_args_print_sbt_version if not defined sbt_args_print_sbt_script_version if not exist build.sbt (
|
||||||
if not exist project\ (
|
if not exist project\ (
|
||||||
if not defined sbt_new (
|
if not defined sbt_new (
|
||||||
|
|
@ -486,6 +484,13 @@ if not defined sbt_args_sbt_create if not defined sbt_args_print_version if not
|
||||||
|
|
||||||
call :process
|
call :process
|
||||||
|
|
||||||
|
rem avoid bootstrapping/java version check for script version
|
||||||
|
|
||||||
|
if !sbt_args_print_sbt_script_version! equ 1 (
|
||||||
|
echo !init_sbt_version!
|
||||||
|
goto :eof
|
||||||
|
)
|
||||||
|
|
||||||
call :checkjava
|
call :checkjava
|
||||||
|
|
||||||
call :copyrt
|
call :copyrt
|
||||||
|
|
@ -569,11 +574,6 @@ set sbt_jar=!sbt_jar:"=!
|
||||||
|
|
||||||
rem TODO: _SBT_OPTS needs to be processed as args and diffed against SBT_ARGS
|
rem TODO: _SBT_OPTS needs to be processed as args and diffed against SBT_ARGS
|
||||||
|
|
||||||
if !sbt_args_print_sbt_script_version! equ 1 (
|
|
||||||
echo !init_sbt_version!
|
|
||||||
goto :eof
|
|
||||||
)
|
|
||||||
|
|
||||||
if !sbt_args_print_sbt_version! equ 1 (
|
if !sbt_args_print_sbt_version! equ 1 (
|
||||||
call :set_sbt_version
|
call :set_sbt_version
|
||||||
echo !sbt_version!
|
echo !sbt_version!
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue