Files
swift-bump-version/Sources/build-example/Build.swift
2023-03-12 23:02:11 -04:00

19 lines
441 B
Swift

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()
)
}
}