Skip to content
This repository was archived by the owner on Dec 22, 2023. It is now read-only.

Commit 8b7434e

Browse files
committed
chore(goreleaser): cli completions
1 parent 08c5129 commit 8b7434e

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
dist
1+
completions
2+
dist

.goreleaser.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
---
22
project_name: cicd
33

4+
before:
5+
hooks:
6+
- sh ./scripts/generate-completions.sh
7+
48
builds:
59
- main: ./cmd/playground
610
binary: playground
@@ -26,7 +30,9 @@ archives:
2630
- goos: windows
2731
format: zip
2832
files:
33+
- completions/*
2934
- LICENSE
35+
- README.md
3036

3137
checksum:
3238
name_template: checksums.txt

scripts/generate-completions.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
mkdir -p completions
4+
5+
for sh in bash fish zsh; do
6+
go run ./cmd/playground/main.go completion $sh >completions/cicd.$sh
7+
done

scripts/install-tools.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
tools=$(go list -f '{{range .Imports}}{{.}} {{end}}' ./tools/tools.go)
4+
5+
go install $tool

0 commit comments

Comments
 (0)