This commit is contained in:
2023-03-12 23:02:11 -04:00
parent 7d69982605
commit b0559d9726
12 changed files with 472 additions and 156 deletions

View File

@@ -0,0 +1,18 @@
import Foundation
import GitVersion
import ShellClient
/// Shows the intended use-case for building a command line tool that set's the version
/// based on the tag in the git worktree.
@main
public struct Build {
public static func main() throws {
@Dependency(\.shellClient) var shell: ShellClient
try shell.replacingNilWithVersionString(
in: "Sources/example/Version.swift",
build: SwiftBuild.release()
)
}
}