Skip to content

Fix the install commands, and gate them against goreleaser - #51

Merged
stxkxs merged 1 commit into
mainfrom
fix/release-url-drift
Jul 31, 2026
Merged

Fix the install commands, and gate them against goreleaser#51
stxkxs merged 1 commit into
mainfrom
fix/release-url-drift

Conversation

@stxkxs

@stxkxs stxkxs commented Jul 31, 2026

Copy link
Copy Markdown
Member

Every documented download URL 404'd. The README named cloudgov_Darwin_arm64.tar.gz and checksums.txt; the live v2.0.0 release carries cloudgov_2.0.0_darwin_arm64.tar.gz and cloudgov_2.0.0_checksums.txt.

Wrong twice over. .goreleaser.yaml names archives {{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}, which lowercases the OS — so Darwin was never right — and embeds the version, which means releases/latest/download/<static-name> resolves to nothing at all: there's no substitution for GitHub to perform.

Five call sites: the human install snippet, its checksum verification, two GitHub Actions recipes, and a GitLab CI recipe. The Homebrew and go install paths were unaffected and still work.

Fix

The human snippet resolves the tag first and builds the versioned filename from it, so it follows releases without a static name to rot.

The three CI recipes take an explicit pinned version instead. That's the better shape for CI regardless of this bug: a scan whose verdict changes because a release landed mid-week is a scan nobody can act on.

Gate

scripts/check-release-urls.sh compares the README's URLs against .goreleaser.yaml's name templates and fails on the three ways they can disagree:

  • a latest/download URL where the template embeds a version
  • an asset name with no version where the template has one
  • a title-cased OS segment

Offline against the committed config, so it holds on a laptop and needs no release to exist. Runs in CI beside the context-awareness check.

Verified failing against the shipped README — it flags all five URLs and names which of the three defects each one has.

The two sides never met before this: goreleaser decides the names, the README repeated them from memory, and no job read both.

Every documented download URL 404'd. The README named
`cloudgov_Darwin_arm64.tar.gz` and `checksums.txt`; the live v2.0.0 release
carries `cloudgov_2.0.0_darwin_arm64.tar.gz` and
`cloudgov_2.0.0_checksums.txt`.

Wrong twice over. `.goreleaser.yaml` names archives
`{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}`, which lowercases the
OS — so `Darwin` was never right — and embeds the version, which means
`releases/latest/download/<static-name>` resolves to nothing at all: there is
no substitution for GitHub to perform.

Five call sites: the human install snippet, its checksum verification, two
GitHub Actions recipes, and a GitLab CI recipe. The Homebrew and `go install`
paths were unaffected and still work.

─── Fix ───

The human snippet resolves the tag first and builds the versioned filename from
it, so it follows releases without a static name to rot.

The three CI recipes take an explicit pinned version instead. That is the
better shape for CI regardless of this bug: a scan whose verdict changes
because a release landed mid-week is a scan nobody can act on.

─── Gate ───

`scripts/check-release-urls.sh` compares the README's URLs against
`.goreleaser.yaml`'s name templates and fails on the three ways they can
disagree: a `latest/download` URL where the template embeds a version, an asset
name with no version where the template has one, and a title-cased OS segment.

Offline against the committed config, so it holds on a laptop and needs no
release to exist. It runs in CI beside the context-awareness check.

Verified failing against the shipped README — it flags all five URLs and names
which of the three defects each one has.

The two sides never met before this: goreleaser decides the names, the README
repeated them from memory, and no job read both.
@stxkxs
stxkxs merged commit 67ecedb into main Jul 31, 2026
12 checks passed
@stxkxs
stxkxs deleted the fix/release-url-drift branch August 3, 2026 01:19
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