Skip to content

[fix] release banner: restore colorlogo (random gradient) + correct version fields#25

Merged
vt128 merged 1 commit into
masterfrom
fix/release-version-banner
Jun 23, 2026
Merged

[fix] release banner: restore colorlogo (random gradient) + correct version fields#25
vt128 merged 1 commit into
masterfrom
fix/release-version-banner

Conversation

@vt128

@vt128 vt128 commented Jun 23, 2026

Copy link
Copy Markdown
Member

What

The goreleaser-built (release) binaries had a regressed --version banner. This fixes the fields and restores the logo colouring. No new release is cut β€” the fix lands on master and rides the next tag.

Changes

  • config/build.go β€” bring colorlogo back (a deliberate keep: it adds real cosmetic value, unlike the dead hlog/winornot/gut), and pick one of several presets at random each run, so the banner varies on every launch.
  • .goreleaser.yaml
    • GitSummary now uses the full tag ({{ .Tag }} β†’ v0.1.2, matching git describe) instead of the v-stripped {{ .Version }} (which showed 0.1.2).
    • Inject GoVersion (it was missing). GoReleaser has no built-in go-version template var, and an ldflag value can't contain spaces (go version ... breaks linking), so use the single-token go env GOVERSION exposed via a GOVERSION env.
    • Drop GitBranch β€” a tag build is a detached HEAD, so it only ever showed HEAD.
  • release.yml β€” export GOVERSION before GoReleaser.

The Makefile's own ldflags (used by make build and the Docker image, which copies a pre-built binary) are unchanged and still inject the full set.

Verified

Local goreleaser build --snapshot (no release):

✰ Build Date: 2026-06-23T...
✰ Go Version: go1.25.9        # back
✰ Git Commit: 4233d4a
✰ GitSummary: v0.1.2          # v-prefixed via {{ .Tag }}
# no "Git Branch: HEAD" line

goreleaser check passes; Docker golang:1.25 floor green; full -race green.

…ersion fields

The goreleaser-built binaries had a regressed --version banner. Fix the fields
and restore the logo colouring:

- config/build.go: bring colorlogo back (a deliberate keep β€” it adds real
  cosmetic value, unlike the dead hlog/winornot/gut) and pick one of several
  presets at random each run, so the banner varies on every launch.
- .goreleaser.yaml: GitSummary now uses the full tag ({{ .Tag }} -> v0.1.2,
  matching `git describe`) instead of the v-stripped {{ .Version }}; inject
  GoVersion via a GOVERSION env (no built-in template var, and it must be a
  single token β€” `go version ...` has spaces that break linking, so use
  `go env GOVERSION`); drop GitBranch (a tag build is a detached HEAD, so it
  only ever showed "HEAD").
- release.yml: export GOVERSION before GoReleaser.

The Makefile's own ldflags (used by `make build` and the Docker image) are
unchanged and still inject the full set. Verified with a local
`goreleaser build --snapshot`: GoVersion present, GitSummary=v0.1.2, no stray
branch. No new release cut β€” this rides the next tag.
@vt128 vt128 merged commit 08b02d8 into master Jun 23, 2026
6 checks passed
@vt128 vt128 deleted the fix/release-version-banner branch June 23, 2026 03:52
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