Refactor in one unique command with subcommand + add a new command to generate ressources from a configuration file
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit

This commit is contained in:
2022-08-30 17:02:11 +02:00
parent a99466f258
commit 264c221604
60 changed files with 825 additions and 235 deletions

View File

@ -0,0 +1,46 @@
//
// StringsConfiguration+ShellCommandable.swift
//
//
// Created by Thibaut Schmitt on 30/08/2022.
//
import Foundation
extension StringsConfiguration: Runnable {
func run(force: Bool) {
var args = [String]()
if force {
args += ["-f"]
}
args += [
inputFile,
"--output-path",
outputPath,
"--langs",
langs,
"--default-lang",
defaultLang,
"--extension-output-path",
extensionOutputPath
]
if let extensionName = extensionName {
args += [
"--extension-name",
extensionName
]
}
if let extensionSuffix = extensionSuffix {
args += [
"--extension-suffix",
extensionSuffix
]
}
Stringium.main(args)
}
}