Skip to content

Commit 2449247

Browse files
authored
feat(homebrew): migrate from Formula to Cask (#2702)
1 parent ed98857 commit 2449247

2 files changed

Lines changed: 18 additions & 11 deletions

File tree

.goreleaser.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,23 +82,30 @@ nfpms:
8282
- src: completion/nu/task-completions.nu
8383
dst: /usr/share/nushell/vendor/autoload/task-completions.nu
8484

85-
brews:
85+
homebrew_casks:
8686
- name: go-task
8787
description: A fast, cross-platform build tool inspired by Make, designed for modern workflows.
88-
license: MIT
8988
homepage: https://taskfile.dev
90-
directory: Formula
89+
binaries:
90+
- task
91+
completions:
92+
bash: completion/bash/task.bash
93+
zsh: completion/zsh/_task
94+
fish: completion/fish/task.fish
95+
# Binaries are not signed/notarized, so remove the quarantine attribute
96+
# set by Homebrew on downloaded cask artifacts to avoid Gatekeeper blocking
97+
# them. See https://goreleaser.com/customization/homebrew_casks/
98+
hooks:
99+
post:
100+
install: |
101+
if system_command("/usr/bin/xattr", args: ["-h"]).exit_status == 0
102+
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/task"]
103+
end
104+
directory: Casks
91105
repository:
92106
owner: go-task
93107
name: homebrew-tap
94108
token: "{{.Env.GH_GORELEASER_TOKEN}}" # So that it runs as the task-bot user
95-
test: system "#{bin}/task", "--help"
96-
install: |-
97-
bin.install "task"
98-
bash_completion.install "completion/bash/task.bash" => "task"
99-
zsh_completion.install "completion/zsh/_task" => "_task"
100-
fish_completion.install "completion/fish/task.fish"
101-
(share/"nushell/vendor/autoload").install "completion/nu/task-completions.nu"
102109
commit_author:
103110
name: task-bot
104111
email: 106601941+task-bot@users.noreply.github.com

website/src/next/docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ apk add task
7575
### [Homebrew](https://brew.sh) ![macOS](https://img.shields.io/badge/MacOS-000000?logo=apple&logoColor=F0F0F0) ![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black) {#homebrew}
7676

7777
Task is available via our official Homebrew tap
78-
[[source](https://github.com/go-task/homebrew-tap/blob/main/Formula/go-task.rb)]:
78+
[[source](https://github.com/go-task/homebrew-tap/blob/main/Casks/go-task.rb)]:
7979

8080
```shell
8181
brew install go-task/tap/go-task

0 commit comments

Comments
 (0)