fix: Add commit and branch to bd version output (github #503)

- Update Makefile install target to extract and pass git commit/branch via ldflags
- Add -X main.Commit and -X main.Branch to all build configurations in .goreleaser.yml
- Create scripts/install.sh helper for explicit version control during installation
- Add comprehensive tests for commit/branch resolution and output formatting

Fixes github #503: 'bd version' now reports as-built commit hash and branch
information regardless of installation method (make install, go install, or
released binaries from goreleaser).
This commit is contained in:
matt wilkie
2025-12-09 06:09:30 -07:00
committed by Steve Yegge
parent 48dec1fada
commit 0423fc689f
4 changed files with 322 additions and 97 deletions

File diff suppressed because one or more lines are too long