fix(release): emit Homebrew postflight_steps instead of postflight - #97
Open
LiorAgnin wants to merge 1 commit into
Open
fix(release): emit Homebrew postflight_steps instead of postflight#97LiorAgnin wants to merge 1 commit into
LiorAgnin wants to merge 1 commit into
Conversation
Homebrew 7.0 deprecates the `postflight` stanza that GoReleaser 2.18 writes for hooks.post.install, so every brew command against the tap warns and asks users to file a bug. hooks.post.install_steps is not in a released GoReleaser yet (goreleaser/goreleaser#6873). Drop the deprecated hook and write postflight_steps through custom_block, using Homebrew's declarative run/on_macos DSL and an escaped {{staged_path}} token.
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
Homebrew 7.0 deprecates the
postflightstanza that GoReleaser 2.18 writes forhooks.post.install. Everybrewcommand that loadsxdevplatform/tap/xurlcurrently warns and asks users to report it to the tap.Released GoReleaser cannot emit
postflight_stepsfromhooks.post.install(goreleaser/goreleaser#6873). This drops the deprecated hook and writespostflight_stepsthroughcustom_blockinstead:if OS.mac?→on_macossystem_command→run#{staged_path}→ Homebrew's install-time{{staged_path}}token, escaped as{{ "{{staged_path}}" }}so GoReleaser does not try to evaluate itThe generated cask keeps the same quarantine-attribute cleanup.
Once GoReleaser ships
hooks.post.install_steps, this can move back to that option (and the stanza will sit in its canonical position afterbinary).A matching tap PR updates the currently published cask so users stop seeing the warning before the next xurl release.