This commit is contained in:
2023-03-13 17:17:12 -04:00
parent b0559d9726
commit 37f3bfde62
12 changed files with 311 additions and 29 deletions

View File

@@ -10,9 +10,20 @@ public struct Build {
public static func main() throws {
@Dependency(\.shellClient) var shell: ShellClient
try shell.replacingNilWithVersionString(
in: "Sources/example/Version.swift",
build: SwiftBuild.release()
)
let gitDir = URL(fileURLWithPath: #file)
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
try withDependencies {
$0.gitVersionClient = .liveValue
$0.logger.logLevel = .debug
} operation: {
try shell.replacingNilWithVersionString(
in: "Sources/example/Version.swift",
from: gitDir.absoluteString,
build: SwiftBuild.release()
)
}
}
}