chore(release): v1.2.0 and stamp the version from the release tag - #3
Merged
Conversation
.goreleaser.yaml stamps -X main.version={{.Version}}, but main.go had no
`version` var and appVersion was a const in internal/tui. Go ignores -X
on a missing symbol, so the ldflag did nothing and a tagged build would
have shipped the hardcoded string.
- main.go declares `var version string` (empty for go build/go run) and
calls tui.SetVersion(version) first thing in main.
- appVersion becomes a var holding the dev-build literal. SetVersion
ignores an empty value and normalizes a bare "1.2.0" to "v1.2.0",
since goreleaser's {{.Version}} drops the prefix.
- appVersion stays the single definition; never duplicate it.
Also rewrites .gitignore to cover the compiled binary (previously
committed at ~6.5MB and since removed from history), test/coverage
output, and editor noise, preserving the _designs allow-list.
README gains a ci badge and a "What's New in v1.2.0" section.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cuts v1.2.0, covering everything since the (never-published)
v1.1.0tag: the sudo account flows, mock mode + VHS demo, the privacy pass, Omarchy 4 theme support (#2), and CI (#1).The bug worth reading
.goreleaser.yamlstamps-X main.version={{.Version}}— butmain.gohad noversionvar, andappVersionwas aconstininternal/tui/view.go. Go silently ignores-Xon a missing symbol, so that ldflag has never done anything. Every tagged build would have shipped whatever string was hardcoded, no matter what tag it was built from.Fixed by:
main.godeclaresvar version string— empty undergo build/go run— and callstui.SetVersion(version)first thing inmain.appVersionbecomes a var holding the dev-build literal.SetVersionignores an empty value (so unstamped builds keep the literal instead of blanking the footer) and normalizes a bare1.2.0→v1.2.0, since goreleaser's{{.Version}}drops the prefix.appVersionremains the single definition of the version.internal/tui/version_test.gocovers the normalization table — bare, prefixed, prerelease, empty — plus a render test asserting the stamped version actually reaches the footer while the layout stays flush.Also
.gitignorerewritten to cover the compiled/tailtuibinary, test/coverage output, and editor/OS noise, preserving the existing_designs/allow-list. The binary was previously committed (~6.5 MB, essentially the whole repo size) and has since been removed from history.cistatus badge, and a "What's New in v1.2.0" section.After merge
Tag
v1.2.0onmainto triggerrelease.yml, which will publish.tar.gz,.deband.rpmfor amd64/arm64 — the first actual published release.