Add --project-directory option to generate command to easily use relative path
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit

This commit is contained in:
2022-08-31 16:42:22 +02:00
parent 3d60513c08
commit e9bc779da6
22 changed files with 136 additions and 67 deletions

View File

@ -1,5 +1,5 @@
//
// ImagesConfiguration+ShellCommandable.swift
// ImagesConfiguration+Runnable.swift
//
//
// Created by Thibaut Schmitt on 30/08/2022.
@ -8,7 +8,7 @@
import Foundation
extension ImagesConfiguration: Runnable {
func run(force: Bool) {
func run(projectDirectory: String, force: Bool) {
var args = [String]()
if force {
@ -16,11 +16,11 @@ extension ImagesConfiguration: Runnable {
}
args += [
inputFile,
inputFile.prependIfRelativePath(projectDirectory),
"--xcassets-path",
xcassetsPath,
xcassetsPath.prependIfRelativePath(projectDirectory),
"--extension-output-path",
extensionOutputPath,
extensionOutputPath.prependIfRelativePath(projectDirectory),
"--static-members",
"\(staticMembersOptions)"
]