https://github.com/theoriginalbit/gitversionplugin
A SwiftPM plugin that codegens a version number, as read by Git, for use in tooling
https://github.com/theoriginalbit/gitversionplugin
build-tool plugin swift swift-plugin swiftpm
Last synced: 28 days ago
JSON representation
A SwiftPM plugin that codegens a version number, as read by Git, for use in tooling
- Host: GitHub
- URL: https://github.com/theoriginalbit/gitversionplugin
- Owner: theoriginalbit
- Created: 2024-02-23T23:24:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-24T00:03:09.000Z (over 2 years ago)
- Last Synced: 2025-03-05T04:38:56.203Z (over 1 year ago)
- Topics: build-tool, plugin, swift, swift-plugin, swiftpm
- Language: Swift
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitVersionPlugin
A SwiftPM plugin that codegens a version number, as read by Git, for use in tooling
Split from [Apple's swift-testing repo](https://github.com/apple/swift-testing/blob/7f39433a0a78ccc92b541597c542b70f68de75e6/Sources/GitStatus/main.swift) and Xcode plugin added to the interface.
The version is determined from:
- If the repository is sitting at a tag with no uncommitted changes, use the tag.
- Otherwise, use the commit hash (with a "there are changes" marker if needed.)
- Finally, fall back to nil if nothing else is available.