diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 49093b2..714fd1c 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -54,12 +54,17 @@ homebrew_casks: homepage: https://github.com/maximilianfeix/dockdu description: "Explains where Docker's disk space went and what prune would NOT give back" binaries: [dockdu] - hooks: - post: - # The binary is not notarised; remove the quarantine flag so macOS runs it. - # Guarded so the same cask installs on Linuxbrew, where xattr does not exist. - install: | - system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/dockdu"] if File.executable?("/usr/bin/xattr") + # The binary is not notarised; remove the quarantine flag so macOS runs it. + # postflight_steps replaces the deprecated postflight block (Homebrew + # install_steps.rb); on_macos keeps Linuxbrew, which has no xattr, out. + # custom_block is a Go template, so Homebrew's {{staged_path}} token is + # written through string literals. + custom_block: | + postflight_steps do + on_macos do + run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{ "{{" }}staged_path{{ "}}" }}/dockdu"] + end + end dockers_v2: - id: dockdu diff --git a/CHANGELOG.md b/CHANGELOG.md index 45ca7e4..73c4190 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ All notable changes to dockdu are listed here. The format follows [Keep a Change ### Added - Volumes Docker created without a name (an image `VOLUME` or `-v /path`, label `com.docker.volume.anonymous`) are marked `anonymous` in the volume list and in JSON (`volumes.items[].anonymous`). `docker rm` without `-v` leaves them behind. Verified on Engine 29.9. +### Fixed +- Homebrew no longer prints "Calling `postflight` is deprecated" on install or upgrade: the cask removes the quarantine flag with `postflight_steps` (GoReleaser `custom_block`) instead of a `postflight` block. Tested by reinstalling from the local tap: no warning, quarantine flag removed (and present without the step). + ## [0.4.0] - 2026-10-15 ### Added