1 Commits (2993149da18d22866560ae1163ff47eb82db3bf1)

Author SHA1 Message Date
Elijah Voigt 16635a908d feat(nbd): add --version flag with X.Y.Z+GitSha format [c24ee8]
build.rs captures the short git SHA at compile time via
`git rev-parse --short HEAD` and emits it as GIT_SHORT_SHA. Falls back
to "unknown" when git is unavailable (e.g. Nix sandboxed builds).

main.rs adds a VERSION const (`env!("CARGO_PKG_VERSION") + "+" + SHA`)
and passes it to clap's `version =` attribute, enabling both -V and
--version flags.

Example output: `nbd 0.1.0+8f4d25b`

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago