mirror of https://github.com/sbt/sbt.git
Improve message since sbtVersion may vary for different projects
This commit is contained in:
parent
88976ad23f
commit
c57c950e92
|
|
@ -79,4 +79,14 @@ object SbtRunnerTest extends SimpleTestSuite with PowerAssertions {
|
||||||
()
|
()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test("sbt -V|-version should print sbtVersion") {
|
||||||
|
val out = sbtProcessWithOpts("-version", "", "").!!.trim
|
||||||
|
val expectedVersion = "^sbt version in this project: \\d\\.\\d+\\.\\d+\\S*$"
|
||||||
|
assert(out.matches(expectedVersion))
|
||||||
|
|
||||||
|
val out2 = sbtProcessWithOpts("-V", "", "").!!.trim
|
||||||
|
assert(out2.matches(expectedVersion))
|
||||||
|
()
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -378,7 +378,7 @@ run() {
|
||||||
|
|
||||||
if [[ $print_sbt_version ]]; then
|
if [[ $print_sbt_version ]]; then
|
||||||
# print sbtVersion
|
# print sbtVersion
|
||||||
execRunner "$java_cmd" -jar "$sbt_jar" "sbtVersion" | tail -1
|
execRunner "$java_cmd" -jar "$sbt_jar" "sbtVersion" | tail -1 | sed -e 's/\[info\]/sbt version in this project:/g'
|
||||||
else
|
else
|
||||||
# run sbt
|
# run sbt
|
||||||
execRunner "$java_cmd" \
|
execRunner "$java_cmd" \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue