Skip to content

packaging: migrate Homebrew publishing from brews to homebrew_casks#6

Merged
postgresql007 merged 1 commit into
mainfrom
homebrew-cask-migration
Jun 23, 2026
Merged

packaging: migrate Homebrew publishing from brews to homebrew_casks#6
postgresql007 merged 1 commit into
mainfrom
homebrew-cask-migration

Conversation

@cybertec-adrian

Copy link
Copy Markdown
Contributor

goreleaser deprecated the brews: (formula) pipe in v2.16 in favour of homebrew_casks:goreleaser check fails the formula config as "uses deprecated properties". Migrate the Homebrew publish accordingly:

  • brews: -> homebrew_casks:
  • install block (bin.install) -> binaries: [pg_hardstorage]
  • drop the formula-only test: block
  • add a postflight hook that strips the Gatekeeper quarantine xattr on macOS (OS.mac?-guarded): the release binaries are cosign-signed but not Apple-notarised, so without it macOS refuses to run the binary ("pg_hardstorage is damaged and cannot be opened")

The end-user install command is unchanged
(brew install cybertec-postgresql/tap/pg_hardstorage), still covering macOS arm64 and Linux amd64/arm64, still no hard PostgreSQL dependency.

Verified with goreleaser check (validated, no deprecation) and a full goreleaser release --snapshot that generated a correct Casks/pg_hardstorage.rb (per-platform url/sha256, binary, postflight, caveats). Since no tag release has populated the tap yet, no Formula cleanup / tap_migrations.json is needed.

Summary

Migrate Homebrew publishing from the deprecated brews: (formula) pipe to homebrew_casks:. goreleaser deprecated brews: in v2.16, so the previous config would fail goreleaser check. The end-user install command is unchanged (brew install cybertec-postgresql/tap/pg_hardstorage); the macOS path now strips the Gatekeeper quarantine xattr since the binaries are cosign-signed but not Apple-notarised.

Type

  • Bug fix
  • New feature
  • Refactor (no behaviour change)
  • Documentation
  • Test infrastructure
  • Packaging / release

Tests

  • make check passes locally (vet + race tests)
  • New tests added for the changed behaviour, or there's a clear reason none exist
  • Integration tests pass (make test-integration) where touched

Compatibility

  • No on-disk manifest schema changes (or: schema bumped + 24-month back-read preserved)
  • No CLI / API contract changes (or: documented + bumped)
  • No new external dependencies (or: justified in the description)

Checklist

  • Maintainer-attribution authoring (Author: Hans-Jürgen Schönig <hs@cybertec.at>)
  • No AI-attribution lines anywhere
  • CHANGELOG.md updated under the unreleased section
  • Comments explain WHY (not WHAT) where the code isn't self-evident

Reviewer / release notes:

  • Supersedes the brews: config from packaging: publish a Homebrew formula on release #5 (not yet exercised by a release,
    so the tap is still empty — no Formula/ cleanup or tap_migrations.json
    needed).
  • First real population of the tap happens on the next v* tag (e.g.
    v1.0.1). After that, test: brew install cybertec-postgresql/tap/pg_hardstorage
  • The postflight xattr strip is a Gatekeeper workaround for un-notarised
    binaries; revisit if/when Apple notarisation is added to the release.

goreleaser deprecated the `brews:` (formula) pipe in v2.16 in favour of
`homebrew_casks:` — `goreleaser check` fails the formula config as
"uses deprecated properties". Migrate the Homebrew publish accordingly:

- brews: -> homebrew_casks:
- install block (bin.install) -> binaries: [pg_hardstorage]
- drop the formula-only test: block
- add a postflight hook that strips the Gatekeeper quarantine xattr on
  macOS (OS.mac?-guarded): the release binaries are cosign-signed but
  not Apple-notarised, so without it macOS refuses to run the binary
  ("pg_hardstorage is damaged and cannot be opened")

The end-user install command is unchanged
(`brew install cybertec-postgresql/tap/pg_hardstorage`), still covering
macOS arm64 and Linux amd64/arm64, still no hard PostgreSQL dependency.

Verified with `goreleaser check` (validated, no deprecation) and a full
`goreleaser release --snapshot` that generated a correct
Casks/pg_hardstorage.rb (per-platform url/sha256, binary, postflight,
caveats). Since no tag release has populated the tap yet, no Formula
cleanup / tap_migrations.json is needed.
@postgresql007 postgresql007 merged commit c073d6c into main Jun 23, 2026
24 checks passed
@postgresql007 postgresql007 deleted the homebrew-cask-migration branch June 23, 2026 09:22
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.

2 participants