Generate completion scripts for bundling in rpm and deb on release

This commit is contained in:
Aleksei Khudiakov 2023-04-08 08:55:45 +10:00
parent 89caedf181
commit be45eedc18
No known key found for this signature in database
GPG key ID: 67771D410C411686
2 changed files with 13 additions and 0 deletions

3
.gitignore vendored
View file

@ -1,5 +1,8 @@
/bin
/share/bash-completion/completions
/share/fish/vendor_completions.d
/share/man/man1
/share/zsh/site-functions
/gh-cli
.envrc
/dist

View file

@ -9,6 +9,10 @@ before:
hooks:
- go mod tidy
- make manpages GH_VERSION={{.Version}}
- mkdir -p ./share/bash-completion/completions ./share/fish/vendor_completions.d ./share/zsh/site-functions
- sh -c "go run ./cmd/gh completion -s bash > ./share/bash-completion/completions/gh"
- sh -c "go run ./cmd/gh completion -s fish > ./share/fish/vendor_completions.d/gh.fish"
- sh -c "go run ./cmd/gh completion -s zsh > ./share/zsh/site-functions/_gh"
builds:
- <<: &build_defaults
@ -70,3 +74,9 @@ nfpms:
contents:
- src: "./share/man/man1/gh*.1"
dst: "/usr/share/man/man1"
- src: "./share/bash-completion/completions/gh"
dst: "/usr/share/bash-completion/completions/gh"
- src: "./share/fish/vendor_completions.d/gh.fish"
dst: "/usr/share/fish/vendor_completions.d/gh.fish"
- src: "./share/zsh/site-functions/_gh"
dst: "/usr/share/zsh/site-functions/_gh"