1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-14 03:51:24 +02:00

fix: install completions with homebrew (#1877)

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
Carlos Alexandro Becker 2020-11-04 23:12:49 -03:00 committed by GitHub
parent 452e97d182
commit fafeb9b0dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 0 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@ snap.login
site/
www/docs/static/releases.json
.vercel
completions/

View File

@ -4,6 +4,7 @@ env:
before:
hooks:
- go mod download
- ./scripts/completions.sh
builds:
- env:
- CGO_ENABLED=0
@ -89,6 +90,10 @@ archives:
format_overrides:
- goos: windows
format: zip
files:
- README.md
- LICENSE.md
- completions/*
brews:
- tap:
owner: goreleaser
@ -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

7
scripts/completions.sh Executable file
View File

@ -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