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
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
This commit is contained in:
@ -118,7 +118,7 @@ class StringsFileGenerator {
|
||||
// Create file if not exists
|
||||
let fileManager = FileManager()
|
||||
if fileManager.fileExists(atPath: extensionFilePath) == false {
|
||||
Shell.shell("touch", "\(extensionFilePath)")
|
||||
Shell.shell(["touch", "\(extensionFilePath)"])
|
||||
}
|
||||
|
||||
// Create extension content
|
||||
|
@ -38,7 +38,7 @@ class TagsGenerator {
|
||||
// Create file if not exists
|
||||
let fileManager = FileManager()
|
||||
if fileManager.fileExists(atPath: extensionFilePath) == false {
|
||||
Shell.shell("touch", "\(extensionFilePath)")
|
||||
Shell.shell(["touch", "\(extensionFilePath)"])
|
||||
}
|
||||
|
||||
// Create extension content
|
||||
|
@ -40,20 +40,20 @@ struct Twine: ParsableCommand {
|
||||
|
||||
// Generate strings files (lproj files)
|
||||
for lang in options.langs {
|
||||
Shell.shell(Self.twineExecutable,
|
||||
Shell.shell([Self.twineExecutable,
|
||||
"generate-localization-file", options.inputFile,
|
||||
"--lang", "\(lang)",
|
||||
"\(options.outputPath)/\(lang).lproj/\(options.inputFilenameWithoutExt).strings",
|
||||
"--tags=ios,iosonly,iosOnly")
|
||||
"--tags=ios,iosonly,iosOnly"])
|
||||
}
|
||||
|
||||
// Generate extension
|
||||
Shell.shell(Self.twineExecutable,
|
||||
Shell.shell([Self.twineExecutable,
|
||||
"generate-localization-file", options.inputFile,
|
||||
"--format", "apple-swift",
|
||||
"--lang", "\(options.defaultLang)",
|
||||
options.extensionFilePath,
|
||||
"--tags=ios,iosonly,iosOnly")
|
||||
"--tags=ios,iosonly,iosOnly"])
|
||||
|
||||
print("[\(Self.toolName)] Strings generated")
|
||||
}
|
||||
|
Reference in New Issue
Block a user