This commit is contained in:
2023-03-14 17:03:24 -04:00
parent 78bfa7863a
commit 8dc72e4a95
11 changed files with 185 additions and 139 deletions

View File

@@ -1,3 +1,4 @@
import ArgumentParser
import Foundation
func parseTarget(_ target: String) -> URL {
@@ -18,3 +19,27 @@ extension URL {
.replacingOccurrences(of: "file://", with: "")
}
}
let template = """
// Do not set this variable, it is set during the build process.
let VERSION: String? = nil
"""
struct SharedOptions: ParsableArguments {
@Argument(help: "The target for the version file.")
var target: String
@Option(
name: .customLong("filename"),
help: "Specify the file name for the version file."
)
var fileName: String = "Version.swift"
@Flag(name: .customLong("dry-run"))
var dryRun: Bool = false
@Flag(name: .long, help: "Increase logging level.")
var verbose: Bool = false
}