Repository navigation
docs(release): correct the tap_migrations.json format and document the hand-off - #134
Merged
Merged
Conversation
…e hand-off
The checklist showed a nested `{"Formula": {"nodeup": "Cask"}}` object.
Homebrew's `Tap#tap_migrations` parses the file with `JSON.parse` and
looks the name up directly, so the format is a flat `{old: new}` hash —
the nested form resolves to nothing and the migration never fires.
Also document the two traps the v1.2.2 migration actually hit:
- The formula removal, the `tap_migrations.json`, and the cask must
all land in the same update cycle. With the formula still present,
`brew install dipto0321/tap/nodeup` resolves to the *formula*
(Homebrew prints "Treating ... as a formula"), so the cask's
quarantine-stripping hook would never reach users.
- The cask's sha256 values must come from the release's own
`checksums.txt`, not from a local `goreleaser --snapshot` render.
Go builds are not byte-reproducible, so snapshot hashes do not match
the published assets and the install fails with "Cask nodeup reports
different checksum".
|
✔️ aabcbb5 - Conventional commits check succeeded. |
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.
Summary
Corrects the
tap_migrations.jsonformat in the release checklist anddocuments the two traps the v1.2.2 Homebrew tap migration actually hit.
The format was wrong
The checklist showed a nested object:
{ "Formula": { "nodeup": "Cask" } }Homebrew's
Tap#tap_migrationsparses the file withJSON.parse(...)and looks the name up directly, so the format is a flat
{old_name: new_name}hash. The nested form resolves to nothing andthe migration never fires.
Trap 1: the migration must land in one update cycle
The formula removal, the
tap_migrations.json, and the cask all haveto land together. With the formula still present,
brew install dipto0321/tap/nodeupresolves to the formula(Homebrew prints "Treating ... as a formula") — and the formula
install is the one that leaves the binary quarantined, so the cask's
quarantine-stripping hook would never reach users.
Trap 2: the cask checksums must come from the release
The cask's sha256 values must come from the release's own
checksums.txt, not from a localgoreleaser --snapshotrender. Gobuilds are not byte-reproducible, so the snapshot hashes do not match
the published assets and the install fails with "Cask nodeup reports
different checksum".
Also updates
docs/installation.mdto say thatbrew updateperforms the formula→cask hand-off automatically (it unlinks the old
keg, installs the cask, and asks you to
brew uninstall --formula --force nodeup), with the manual commandsfor anyone who prefers to do it themselves.
Test plan
formula install,
brew updatedetected the migration, unlinkedthe old keg, installed the cask, and the resulting binary came
out with no quarantine attribute and ran 3/3 times.
brew uninstall --formula --force nodeupleft the cask installintact and
nodeup versionstill worked.go build ./...,go vet ./...,gofmt -l .,golangci-lint run ./...,go test -race ./...all pass.
🤖 Generated with puku-cli