From f855fe9c7af81a8ea8727225e48a217f189386bd Mon Sep 17 00:00:00 2001 From: Adphi Date: Mon, 12 Sep 2022 10:10:28 +0200 Subject: [PATCH] Makefile: add completions generation goreleaser: fix typo, add completions to release archive Signed-off-by: Adphi --- .gitignore | 1 + .goreleaser.yaml | 9 +++++++-- Makefile | 8 ++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 4679f56..f481495 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ images .goreleaser.yaml docs/build docs-src +/completions diff --git a/.goreleaser.yaml b/.goreleaser.yaml index fc0db92..b8c3f0d 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -15,6 +15,7 @@ project_name: d2vm before: hooks: - go mod tidy + - make completions builds: - main: ./cmd/d2vm env: @@ -38,9 +39,13 @@ snapshot: release: prerelease: auto extra_files: - - glob: README.md - - glob: LICENSE + - glob: LICENCE - glob: pgp.pub +archives: +- files: + - LICENCE + - README.md + - completions/* changelog: sort: asc filters: diff --git a/Makefile b/Makefile index eda8fab..4eade6f 100644 --- a/Makefile +++ b/Makefile @@ -101,6 +101,14 @@ build: bin release: bin @VERSION=$(VERSION) IMAGE=$(DOCKER_IMAGE) goreleaser release --rm-dist --parallelism 8 +.PHONY: completions +completions: .build + @rm -rf completions + @mkdir -p completions + @for shell in bash zsh fish powershell; do \ + d2vm completion $$shell > completions/d2vm.$$shell; \ + done + .PHONY: examples examples: build-dev @mkdir -p examples/build