1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-25 07:57:12 -07:00

Added --version argument to app.

This commit is contained in:
Erik C. Thauvin 2018-01-20 17:04:56 -08:00
parent 41ba68c630
commit 22d983d559
2 changed files with 7 additions and 0 deletions

View file

@ -101,5 +101,8 @@ class Args {
@Parameter(names = arrayOf("--update"), description = "Update to the latest version of Kobalt")
var update: Boolean = false
@Parameter(names = arrayOf("--version"), description = "Display the current version of Kobalt")
var version: Boolean = false
}

View file

@ -42,6 +42,10 @@ class Main @Inject constructor(
jc.usage()
return 0
}
if (args.version) {
println("Kobalt ${Kobalt.version}")
return 0
}
Kobalt.init(MainModule(args, KobaltSettings.readSettingsXml()))
val result = launchMain(Kobalt.INJECTOR.getInstance(Main::class.java), jc, args, argv)
return result