From 761afec8f8558ee76b6521ccd52988041e29dc9a Mon Sep 17 00:00:00 2001 From: Audrey Tang Date: Sun, 13 Sep 2026 21:44:05 +0100 Subject: [PATCH] fix(release): emit Homebrew postflight_steps instead of postflight Homebrew deprecated the `postflight` stanza that GoReleaser writes from `homebrew_casks.hooks.post.install`, so every `brew` command that loads the cask warned. GoReleaser does not yet have `hooks.post.install_steps` (goreleaser/goreleaser#6873), so the quarantine xattr strip moves into `custom_block` as `postflight_steps` with an `on_macos` guard. The `{{ "{{staged_path}}" }}` escape survives GoReleaser's second template pass and becomes Homebrew's install-time `{{staged_path}}` token. Linux installs still skip `/usr/bin/xattr`. --- .goreleaser.yml | 18 ++++++++++++------ CHANGELOG.md | 6 ++++++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 559a9f67..101327cf 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -65,12 +65,18 @@ homebrew_casks: token: "{{ .Env.HOMEBREW_TAP_TOKEN }}" homepage: "https://github.com/mnemon-dev/mnemon" description: "Persistent memory and durable agency for LLM agents" - hooks: - post: - install: | - if OS.mac? - system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/mnemon"] - end + # Homebrew deprecated `postflight` (emitted by hooks.post.install) in + # favor of `postflight_steps`. GoReleaser does not emit that stanza yet + # (goreleaser/goreleaser#6873). custom_block is not wrapped, so it can + # carry the new DSL. `{{ "{{staged_path}}" }}` survives GoReleaser's + # second template pass and becomes Homebrew's install-time token. + # Drop this once hooks.post.install_steps ships. + custom_block: | + postflight_steps do + on_macos do + run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{ "{{staged_path}}" }}/mnemon"] + end + end release: github: diff --git a/CHANGELOG.md b/CHANGELOG.md index ac722ebd..3a5e53ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/). hook registry, but its current local Agent V2 turn path does not dispatch the user-prompt lifecycle event needed for reliable automatic recall. +### Fixed + +- The Homebrew cask no longer uses the deprecated `postflight` stanza. The + macOS quarantine strip is now `postflight_steps`, so `brew` stops warning + on every command that loads the cask. + ## [0.2.7] - 2026-09-01 ### Fixed