Files
resgen.swift/Sources/ResgenSwift/Generate/Runnable/ImagesConfiguration+ShellCommandable.swift
Thibaut Schmitt 3d60513c08
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
Add new Flag to every command to choose if we want to generate static members or not
2022-08-31 15:18:44 +02:00

44 lines
963 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"] // Images has a -f and -F options
}
args += [
inputFile,
"--xcassets-path",
xcassetsPath,
"--extension-output-path",
extensionOutputPath,
"--static-members",
"\(staticMembersOptions)"
]
if let extensionName = extensionName {
args += [
"--extension-name",
extensionName
]
}
if let extensionSuffix = extensionSuffix {
args += [
"--extension-suffix",
extensionSuffix
]
}
Images.main(args)
}
}