Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: install completions with homebrew #1877

Merged
merged 1 commit into from Nov 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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