Skip to content

Commit

Permalink
make: don't gunzip the manpages (#103)
Browse files Browse the repository at this point in the history
Signed-off-by: Yoan Blanc <[email protected]>
Signed-off-by: Stefano Marengo <[email protected]>
Reviewed-by: Pierre-Emmanuel Jacquier <[email protected]>
  • Loading branch information
greut authored Feb 21, 2019
1 parent d5e5dfc commit 04947ac
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
dist
exo
manpage
completion/bash
contrib
go.sum
10 changes: 5 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ archive:
format: zip
files:
- LICENSE
- completion/*
- contrib/completion/**/*
- manpage/*

release:
Expand All @@ -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:
Expand All @@ -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"
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 $</exo

.PHONY: clean
clean:
go clean
rm -rf exo bash_completion manpage
rm -rf exo contrib/completion manpage

0 comments on commit 04947ac

Please sign in to comment.