Skip to content

fix(ci): Patch cask sha256 structurally to survive goreleaser format changes#144

Merged
misonijnik merged 1 commit into
mainfrom
misonijnik/fix-homebrew-release-hashes
May 15, 2026
Merged

fix(ci): Patch cask sha256 structurally to survive goreleaser format changes#144
misonijnik merged 1 commit into
mainfrom
misonijnik/fix-homebrew-release-hashes

Conversation

@misonijnik
Copy link
Copy Markdown
Member

The prior sed-based hash rewrite assumed the cask emitted url ... on one line and sha256 ... on the next. GoReleaser flipped the order between v0.2.0 and v0.2.1, so the sed silently no-ops and the cask carries the pre-JRE-bundling hash, which brew install rejects.

Replace it with patch-cask-sha256.py: for each on_intel/on_arm block, read the archive filename from the url line, compute sha256 of the local JRE-bundled archive, and rewrite that block's sha256. Order-independent; exits non-zero on any anomaly (missing archive, missing sha256 line, no blocks at all) so a future silent format change cannot ship stale hashes.

…changes

The prior sed-based hash rewrite assumed the cask emitted `url ...` on
one line and `sha256 ...` on the next. GoReleaser flipped the order
between v0.2.0 and v0.2.1, so the sed silently no-ops and the cask
carries the pre-JRE-bundling hash, which `brew install` rejects.

Replace it with patch-cask-sha256.py: for each on_intel/on_arm block,
read the archive filename from the url line, compute sha256 of the local
JRE-bundled archive, and rewrite that block's sha256. Order-independent;
exits non-zero on any anomaly (missing archive, missing sha256 line, no
blocks at all) so a future silent format change cannot ship stale hashes.
@misonijnik misonijnik merged commit f90ce3a into main May 15, 2026
12 of 13 checks passed
@misonijnik misonijnik deleted the misonijnik/fix-homebrew-release-hashes branch May 15, 2026 01:33
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