gutd uses dynamic versioning based on git tags at build time.
The build.rs script queries git to determine the version:
-
On exact tag (e.g.,
v1.0.0): Shows tag name$ gutd --version gutd v1.0.0
-
Between tags: Shows
<latest-tag>-<commits>-g<hash>$ gutd --version gutd v1.0.0-5-ga53dbc4
-
No tags: Shows short commit hash
$ gutd --version gutd a53dbc4
-
Uncommitted changes: Adds
-dirtysuffix$ gutd --version gutd v1.0.0-dirty
-
No git repo: Falls back to
Cargo.tomlversion$ gutd --version gutd 1.0.0
# Show version
gutd --version
gutd -v
# Show help
gutd --help
gutd -hThe version is automatically embedded at build time:
- GitHub Actions builds include full git describe info
- Release builds use tag version (e.g.,
v1.0.0) - Development builds show commit hash
# Tag a new version
git tag -a v1.0.1 -m "Release v1.0.1"
git push origin v1.0.1
# This triggers release workflow which:
# 1. Builds with version v1.0.1
# 2. Runs tests
# 3. Creates GitHub Release