[fix] release banner: restore colorlogo (random gradient) + correct version fields#25
Merged
Merged
Conversation
β¦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.
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.
What
The goreleaser-built (release) binaries had a regressed
--versionbanner. 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 deadhlog/winornot/gut), and pick one of several presets at random each run, so the banner varies on every launch..goreleaser.yamlGitSummarynow uses the full tag ({{ .Tag }}βv0.1.2, matchinggit describe) instead of the v-stripped{{ .Version }}(which showed0.1.2).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-tokengo env GOVERSIONexposed via aGOVERSIONenv.GitBranchβ a tag build is a detached HEAD, so it only ever showedHEAD.release.ymlβ exportGOVERSIONbefore GoReleaser.The Makefile's own ldflags (used by
make buildand the Docker image, which copies a pre-built binary) are unchanged and still inject the full set.Verified
Local
goreleaser build --snapshot(no release):goreleaser checkpasses; Dockergolang:1.25floor green; full-racegreen.