Files
resgen.swift/Sources/ResgenSwift/Generate/ShellCommandable/ImagesConfiguration+ShellCommandable.swift
Thibaut Schmitt 264c221604
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
Refactor in one unique command with subcommand + add a new command to generate ressources from a configuration file
2022-08-30 17:02:11 +02:00

42 lines
858 B
Swift

//
// ImagesConfiguration+ShellCommandable.swift
//
//
// Created by Thibaut Schmitt on 30/08/2022.
//
import Foundation
extension ImagesConfiguration: Runnable {
func run(force: Bool) {
var args = [String]()
if force {
args += ["-f"]
}
args += [
inputFile,
"--xcassets-path",
xcassetsPath,
"--extension-output-path",
extensionOutputPath
]
if let extensionName = extensionName {
args += [
"--extension-name",
extensionName
]
}
if let extensionSuffix = extensionSuffix {
args += [
"--extension-suffix",
extensionSuffix
]
}
Images.main(args)
}
}