Skip to content

Commit f303279

Browse files
committed
Migrate goreleaser config off deprecated keys
`goreleaser check` against v2.15.4 flagged two deprecations: * `archives.format: tar.gz` → `archives.formats: [tar.gz]` (renamed in v2.6; still accepts a string but plural is the forward-compatible shape). * `brews:` → `homebrew_casks:` (renamed in v2.10). For a CLI binary the cask handles binary placement implicitly via `binary "atlas"`, so the `install: bin.install "atlas"` line was dropped. Because atlas binaries aren't signed/notarized, the cask needs a `hooks.post.install` step that strips the macOS quarantine xattr — otherwise `brew install` succeeds but Gatekeeper refuses to launch the binary. The hook is guarded by `OS.mac?` so it's a no-op on Linuxbrew. Verified with `goreleaser check` (exits 0) and `goreleaser release --snapshot --clean --skip=publish` (four archives, checksums match, generated cask validates against checksums.txt and renders the expected per-platform url/sha256 + postflight xattr block).
1 parent a2797e2 commit f303279

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

.goreleaser.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,29 @@ builds:
1616
- arm64
1717

1818
archives:
19-
- format: tar.gz
19+
- formats: [tar.gz]
2020
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
2121

2222
checksum:
2323
name_template: "checksums.txt"
2424

25-
brews:
25+
homebrew_casks:
2626
- repository:
2727
owner: sethdeckard
2828
name: homebrew-tap
2929
token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
3030
homepage: https://github.com/sethdeckard/atlas
3131
description: "Curated map of every Git repo under ~/projects"
3232
license: MIT
33-
install: |
34-
bin.install "atlas"
33+
# atlas binaries aren't signed/notarized; strip macOS quarantine
34+
# so `brew install` produces a runnable binary. Linux/Linuxbrew
35+
# is a no-op via the OS.mac? guard.
36+
hooks:
37+
post:
38+
install: |
39+
if OS.mac?
40+
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/atlas"]
41+
end
3542
3643
changelog:
3744
sort: asc

0 commit comments

Comments
 (0)