Add -V|-version to print sbtVersion.

This commit is contained in:
exoego 2019-07-18 16:23:14 +09:00
parent 34d17d8573
commit 16f5b638df
3 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,7 @@ Usage: sbt [options]
-h | -help print this message
-v | -verbose this runner is chattier
-V | -version print the version of mothership sbt
-d | -debug set sbt log level to debug
-no-colors disable ANSI color codes
-sbt-create start sbt even if current directory contains no sbt project

View File

@ -20,6 +20,8 @@ The current directory is assumed to be the project.
Show help options.
.IP "-v, -verbose"
turn up the noise
.IP "-V, -version"
print the version of mothership sbt
.IP "-d, -debug"
set sbt log level to debug
.IP -no-colors

View File

@ -405,6 +405,7 @@ Usage: `basename "$0"` [options]
-h | --help print this message
-v | --verbose this runner is chattier
-V | --version print the version of mothership sbt
-d | --debug set sbt log level to debug
--no-colors disable ANSI color codes
--color=auto|always|true|false|never
@ -512,6 +513,7 @@ process_args () {
case "$1" in
-h|-help) usage; exit 1 ;;
-v|-verbose) verbose=1 && shift ;;
-V|-version) addSbt "sbtVersion" && shift ;;
-d|-debug) debug=1 && addSbt "-debug" && shift ;;
-ivy) require_arg path "$1" "$2" && addJava "-Dsbt.ivy.home=$2" && shift 2 ;;