Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
45 lines
955 B
Swift
45 lines
955 B
Swift
//
|
|
// AnalyticsConfiguration+Runnable.swift
|
|
//
|
|
//
|
|
// Created by Loris Perret on 08/12/2023.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
extension AnalyticsConfiguration: Runnable {
|
|
|
|
func run(projectDirectory: String, force: Bool) {
|
|
var args = [String]()
|
|
|
|
if force {
|
|
args += ["-f"]
|
|
}
|
|
|
|
args += [
|
|
inputFile.prependIfRelativePath(projectDirectory),
|
|
"--target",
|
|
target,
|
|
"--extension-output-path",
|
|
extensionOutputPath.prependIfRelativePath(projectDirectory),
|
|
"--static-members",
|
|
"\(staticMembersOptions)"
|
|
]
|
|
|
|
if let extensionName {
|
|
args += [
|
|
"--extension-name",
|
|
extensionName
|
|
]
|
|
}
|
|
if let extensionSuffix {
|
|
args += [
|
|
"--extension-suffix",
|
|
extensionSuffix
|
|
]
|
|
}
|
|
|
|
Analytics.main(args)
|
|
}
|
|
}
|