Skip to content

Commit

Permalink
fix: install completions with homebrew (#1877)
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
  • Loading branch information
caarlos0 committed Nov 5, 2020
1 parent 452e97d commit fafeb9b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -8,3 +8,4 @@ snap.login
site/
www/docs/static/releases.json
.vercel
completions/
10 changes: 10 additions & 0 deletions .goreleaser.yml
Expand Up @@ -4,6 +4,7 @@ env:
before:
hooks:
- go mod download
- ./scripts/completions.sh
builds:
- env:
- CGO_ENABLED=0
Expand Down Expand Up @@ -89,6 +90,10 @@ archives:
format_overrides:
- goos: windows
format: zip
files:
- README.md
- LICENSE.md
- completions/*
brews:
- tap:
owner: goreleaser
Expand All @@ -100,6 +105,11 @@ brews:
system "#{bin}/goreleaser -v"
dependencies:
- name: go
install: |-
bin.install "goreleaser"
bash_completion.install "completions/goreleaser.bash" => "goreleaser"
zsh_completion.install "completions/goreleaser.zsh" => "_goreleaser"
fish_completion.install "completions/goreleaser.fish"
scoop:
bucket:
owner: goreleaser
Expand Down
7 changes: 7 additions & 0 deletions scripts/completions.sh
@@ -0,0 +1,7 @@
#!/bin/sh
set -e
rm -rf completions
mkdir completions
for sh in bash zsh fish; do
go run main.go completion "$sh" >"completions/goreleaser.$sh"
done

1 comment on commit fafeb9b

@vercel
Copy link

@vercel vercel bot commented on fafeb9b Nov 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.