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:
parent
41ba68c630
commit
22d983d559
2 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue