Skip to content

chore(release): v1.2.0 and stamp the version from the release tag - #3

Merged
Phundahl merged 1 commit into
mainfrom
chore/release-v1.2.0
Aug 20, 2026
Merged

chore(release): v1.2.0 and stamp the version from the release tag#3
Phundahl merged 1 commit into
mainfrom
chore/release-v1.2.0

Conversation

@Phundahl

Copy link
Copy Markdown
Owner

Cuts v1.2.0, covering everything since the (never-published) v1.1.0 tag: the sudo account flows, mock mode + VHS demo, the privacy pass, Omarchy 4 theme support (#2), and CI (#1).

The bug worth reading

.goreleaser.yaml stamps -X main.version={{.Version}} — but main.go had no version var, and appVersion was a const in internal/tui/view.go. Go silently ignores -X on 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.go declares var version string — empty under 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 (so unstamped builds keep the literal instead of blanking the footer) and normalizes a bare 1.2.0v1.2.0, since goreleaser's {{.Version}} drops the prefix.
  • appVersion remains the single definition of the version.

internal/tui/version_test.go covers 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

  • .gitignore rewritten to cover the compiled /tailtui binary, 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.
  • README: ci status badge, and a "What's New in v1.2.0" section.
  • CLAUDE.md: phase entries for the CI work and this release, plus a new standing Git workflow section documenting the branch → PR → squash-merge → tag flow this repo now follows.

After merge

Tag v1.2.0 on main to trigger release.yml, which will publish .tar.gz, .deb and .rpm for amd64/arm64 — the first actual published release.

.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>
@Phundahl
Phundahl merged commit c10ee2a into main Aug 20, 2026
2 checks passed
@Phundahl
Phundahl deleted the chore/release-v1.2.0 branch August 20, 2026 11:49
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