|
|
|
@ -34,7 +34,8 @@ class CliArgumentsParser(name: String) : CliTargetParser(name) {
|
|
|
|
|
),
|
|
|
|
|
module.configFileName,
|
|
|
|
|
module.applicationFileName,
|
|
|
|
|
module.submodules
|
|
|
|
|
module.submodules,
|
|
|
|
|
module.reprovision,
|
|
|
|
|
)
|
|
|
|
|
else -> return ServerCliCommand(
|
|
|
|
|
ServerType.valueOf(module.name.uppercase()),
|
|
|
|
@ -52,6 +53,7 @@ class CliArgumentsParser(name: String) : CliTargetParser(name) {
|
|
|
|
|
var configFileName: ConfigFileName? = null
|
|
|
|
|
var applicationFileName: ApplicationFileName? = null
|
|
|
|
|
var submodules: List<String>? = null
|
|
|
|
|
var reprovision: Boolean = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class K3s : ServerSubcommand("k3s", "the k3s module, 'provs-server.jar k3s --help' for more info") {
|
|
|
|
@ -73,11 +75,17 @@ class CliArgumentsParser(name: String) : CliTargetParser(name) {
|
|
|
|
|
"o",
|
|
|
|
|
"provisions only parts ",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
val cliReprovision by option(
|
|
|
|
|
ArgType.Boolean,
|
|
|
|
|
"reprovision",
|
|
|
|
|
"r",
|
|
|
|
|
"redo provisioning, deletes old config first",
|
|
|
|
|
)
|
|
|
|
|
override fun execute() {
|
|
|
|
|
super.configFileName = cliConfigFileName?.let { ConfigFileName(it) }
|
|
|
|
|
super.applicationFileName = cliApplicationFileName?.let { ApplicationFileName(it) }
|
|
|
|
|
super.submodules = if (only != null) listOf(only!!.name.lowercase()) else null
|
|
|
|
|
super.reprovision = cliReprovision == true
|
|
|
|
|
super.parsed = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|