Skip to content

chore: prepare v0.8.2 and guard the flake version against the tag - #4

Merged
Arnonrgo merged 1 commit into
masterfrom
chore/release-v0.8.2
Sep 8, 2026
Merged

chore: prepare v0.8.2 and guard the flake version against the tag#4
Arnonrgo merged 1 commit into
masterfrom
chore/release-v0.8.2

Conversation

@Arnonrgo

@Arnonrgo Arnonrgo commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Why

v0.8.1 shipped most of what #3 set out to fix — 8 assets, and a checksums.txt that actually verifies (sha256sum -c exits 0 on clean assets, 1 on a tampered one; the v0.8.0 file matched nothing and exited 0 anyway). Intel and Apple Silicon binaries both run and report mcli version 0.8.1.

The cask didn't publish. HOMEBREW_TAP_TOKEN wasn't set at the time, so the cask pipe got 401 Bad credentials. The secret exists now, but re-running the job can't recover it:

scm releases: failed to publish artifacts: could not release:
  release v0.8.1 already exists and is immutable, it cannot be updated

Releases in this repo are immutable, and release.Pipe{} runs before cask.Pipe{} (goreleaser orders it that way deliberately — "brew et al use the release URL, so, they should be last"). So the re-run dies before reaching the cask. goreleaser's check is unconditional, with the comment "retrying will never succeed", and while there's a homebrew skip key, there's no skip for the SCM release — the cask can't be published by itself. A fresh tag is the only path, hence the bump.

The guard

Immutability means a tag-time mistake is permanent, so this adds a preflight check for the one input that can silently disagree with the tag.

flake.nix has to state its version literally — Nix builds from a source tree with no .git, so git describe isn't available. Nothing else would catch a stale value: the Go build is unaffected, CI on master can't compare against a tag, and the flake would keep building and reporting the wrong version indefinitely. This bit immediately: bumping to v0.8.2 required remembering to edit flake.nix.

The step runs before Go is even set up, so it fails in seconds and nothing gets published. It reads the tag from env: rather than interpolating ${{ }} into the script, consistent with a72d115.

Verification

  • Guard accepts v0.8.2, rejects v0.8.1 and v1.0.0 (exit 1 with an ::error file=flake.nix:: annotation).
  • nix build .#mclimcli version 0.8.2.

After merge

Tag v0.8.2. With the secret in place this exercises the whole path end to end, and populates Casks/mcli.rb in the tap — which is the part still unproven in production.

🤖 Generated with Claude Code

v0.8.1 published its binaries, tarballs and a working checksums.txt, but
not the Homebrew cask: HOMEBREW_TAP_TOKEN was not set yet, so the cask pipe
got 401 Bad credentials. Re-running with the secret in place cannot fix it.
Releases here are immutable, and the `release` pipe runs before `cask` --
goreleaser bails with "already exists and is immutable, it cannot be
updated" before it ever reaches the cask. There is a `homebrew` skip key but
none for the SCM release, so the cask cannot be published on its own. The
tap therefore needs a fresh tag, which is what the version bump is for.

Immutability makes any tag-time mistake permanent, so add a preflight check
for the one input that can silently disagree with the tag: flake.nix states
its version literally, since Nix builds from a source tree with no .git and
`git describe` is unavailable there. Nothing else would catch a stale value
-- the flake would just build and report the wrong version forever. The
check reads the tag from the environment rather than interpolating it into
the script, matching a72d115.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Arnonrgo
Arnonrgo merged commit 80f2aca into master Sep 8, 2026
3 checks passed
@Arnonrgo
Arnonrgo deleted the chore/release-v0.8.2 branch September 8, 2026 18:05
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