v0.2.1 was tagged on a commit whose Makefile still said VERSION := v0.2.0, so every binary attached to that release prints v0.2.0 from draft version (verified by running the published macOS asset). The version was a hand-edited constant, so tagging before committing the bump was easy to do and invisible until someone ran the binary
VERSION now comes from git describe --tags --always: exactly the tag on a tagged commit (v0.2.1), tag-plus-distance after it (v0.2.1-3-g1a2b3c4), and dev outside a git checkout such as a source tarball. make build VERSION=… still overrides it. There is nothing left to bump before tagging
What this does not do
It fixes the cause going forward. The binaries already attached to the v0.2.1 release still report v0.2.0 and need the release to be re-cut (or v0.2.2 published) from a build made after this merges.
Test plan
On the v0.2.1 commit: make version → v0.2.1
Commit tagged exactly: reports the tag name
make version VERSION=v0.2.1 → override wins
git archive tarball with no .git: make version → dev
## Summary
- `v0.2.1` was tagged on a commit whose `Makefile` still said `VERSION := v0.2.0`, so every binary attached to that release prints `v0.2.0` from `draft version` (verified by running the published macOS asset). The version was a hand-edited constant, so tagging before committing the bump was easy to do and invisible until someone ran the binary
- `VERSION` now comes from `git describe --tags --always`: exactly the tag on a tagged commit (`v0.2.1`), tag-plus-distance after it (`v0.2.1-3-g1a2b3c4`), and `dev` outside a git checkout such as a source tarball. `make build VERSION=…` still overrides it. There is nothing left to bump before tagging
## What this does not do
It fixes the cause going forward. The binaries already attached to the `v0.2.1` release still report `v0.2.0` and need the release to be re-cut (or `v0.2.2` published) from a build made after this merges.
## Test plan
- [x] On the `v0.2.1` commit: `make version` → `v0.2.1`
- [x] Commit tagged exactly: reports the tag name
- [x] `make version VERSION=v0.2.1` → override wins
- [x] `git archive` tarball with no `.git`: `make version` → `dev`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
The version was a hand-edited constant in the Makefile, so tagging a release
without first committing the bump produced a release whose binaries disagree
with it: v0.2.1 was tagged on a commit still saying VERSION := v0.2.0, and
all four binaries attached to that release print v0.2.0 from `draft version`.
VERSION now comes from `git describe --tags --always`: exactly the tag on a
tagged commit (v0.2.1), tag-plus-distance after it (v0.2.1-3-g1a2b3c4), `dev`
outside a git checkout such as a source tarball. `make build VERSION=...`
still overrides it. There is nothing left to bump before tagging.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
v0.2.1was tagged on a commit whoseMakefilestill saidVERSION := v0.2.0, so every binary attached to that release printsv0.2.0fromdraft version(verified by running the published macOS asset). The version was a hand-edited constant, so tagging before committing the bump was easy to do and invisible until someone ran the binaryVERSIONnow comes fromgit describe --tags --always: exactly the tag on a tagged commit (v0.2.1), tag-plus-distance after it (v0.2.1-3-g1a2b3c4), anddevoutside a git checkout such as a source tarball.make build VERSION=…still overrides it. There is nothing left to bump before taggingWhat this does not do
It fixes the cause going forward. The binaries already attached to the
v0.2.1release still reportv0.2.0and need the release to be re-cut (orv0.2.2published) from a build made after this merges.Test plan
v0.2.1commit:make version→v0.2.1make version VERSION=v0.2.1→ override winsgit archivetarball with no.git:make version→dev🤖 Generated with Claude Code