Skip to content

Show the git tag in the version output - #9

Merged
skunkworker merged 1 commit into
masterfrom
jb/2026_10_11_version_tag
Oct 11, 2026
Merged

skunkworker merged 1 commit into
masterfrom
jb/2026_10_11_version_tag

Conversation

@skunkworker

Copy link
Copy Markdown
Owner

go build already stamps the module version from git tags into the binary. git_pruner version and the help screen now print it.

Build version:
On a tagged commit v0.1.0
On a tag, with uncommitted changes v0.1.0+dirty
After the tag v0.1.1-0.<time>-<hash> (Go pseudo-version)
No VCS info (go run) unknown

-ldflags "-X main.version=..." overrides it, like the commit and date.

🤖 Generated with Claude Code

go build already stamps the module version from git tags into the
binary. git_pruner version and the help screen now print it: the tag
on a tagged commit, a Go pseudo-version on later commits, +dirty with
uncommitted changes, and "unknown" without VCS info. -X main.version
overrides it, like the commit and date.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@skunkworker
skunkworker merged commit 73f5d90 into master Oct 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant