Expand description
Version comparison utility for git describe format version strings.
Supports comparing versions like:
v0.9.46(tagged releases)v0.9.46-5-gabc123(development builds with commits ahead)v0.9.46-5-gabc123-dirty(dirty working tree)
When versions contain different git hashes, GitHub API is used to check ancestry relationships. The API client is created internally with no authentication for public repository access.
Structs§
- Build
Attributes - Compile-time build provenance attributes.
- Build
Timestamp - Build timestamp parsed from Unix epoch seconds.
- Compare
Response 🔒 - Response from GitHub’s compare API.
- GitVersion
- A parsed git describe version string.
- Pull
Request Info - Pull request metadata captured at build time.
- Version
- Complete compile-time version metadata for display.
Enums§
- Build
Kind - Build flavor captured from Cargo features.
- Version
Comparison - Result of comparing two versions.
- Version
Error - Errors that can occur during version parsing or comparison.
Functions§
- check_
ancestry 🔒 - Checks commit ancestry using GitHub’s compare API.
- compare_
semver - Compares semantic versions (major, minor, patch) between two versions.
- get_
build_ attributes - Returns compile-time build provenance attributes.
- get_
build_ 🔒kind - get_
current_ version - Returns the current application version from compile-time environment.
- get_
version - Returns complete compile-time version metadata for display.
- parse_
semver 🔒