diff --git a/.gitignore b/.gitignore index 6bfc64d9..4452bcbe 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,5 @@ dist exo manpage -completion/bash +contrib go.sum diff --git a/.goreleaser.yml b/.goreleaser.yml index f872d3d8..e4efbac6 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -29,7 +29,7 @@ archive: format: zip files: - LICENSE - - completion/* + - contrib/completion/**/* - manpage/* release: @@ -49,8 +49,8 @@ nfpm: - rpm files: - "./manpage/exo*.1.gz": "/usr/share/man/man1" - "./completion/bash/exo": "/etc/bash_completion.d/exo" + "./manpage/exo*.1": "/usr/share/man/man1" + "./contrib/completion/bash/exo": "/etc/bash_completion.d/exo" brew: github: @@ -61,5 +61,5 @@ brew: description: Manage (almost) everything at Exoscale from the command line. install: | bin.install "exo" - man.install "manpage/exo*.1.gz" - bash_completion.install "completion/bash/exo" + man1.install Dir["manpage/exo*.1"] + bash_completion.install "contrib/completion/bash/exo" diff --git a/Makefile b/Makefile index f8a71991..e4767ff0 100644 --- a/Makefile +++ b/Makefile @@ -27,21 +27,20 @@ docker: Dockerfile $(GO_FILES) manpage: mkdir -p $@ - go run -mod vendor doc/main.go --man-page .PHONY: manpages manpages: manpage $(GO_FILES) - $(foreach page,$(shell find $< -type f -iname '*.1'), gzip $(page);) + go run -mod vendor doc/main.go --man-page -completion/bash: - mkdir -p completion/bash +contrib/completion/bash: + mkdir -p $@ .PHONY: completions -completions: completion/bash $(GO_FILES) +completions: contrib/completion/bash $(GO_FILES) go run -mod vendor completion/main.go - mv bash_completion completion/bash/exo + mv bash_completion $