diff --git a/Makefile b/Makefile index a8786b19..a1da2246 100644 --- a/Makefile +++ b/Makefile @@ -79,8 +79,8 @@ tmp/help.txt: drone-cache $(ROOT_DIR)/drone-cache --help &> tmp/help.txt tmp/make_help.txt: Makefile - mkdir -p tmp - make help &> tmp/make_help.txt + -mkdir -p tmp + fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'| column -s: -t &> tmp/make_help.txt README.md: tmp/help.txt tmp/make_help.txt $(EMBEDMD_BIN) $(EMBEDMD_BIN) -w README.md @@ -167,11 +167,7 @@ format: ; $(info $(M) running format ) .PHONY: help help: ## Shows this help message - $(Q) echo 'usage: make [target] ...' - $(Q) echo - $(Q) echo 'targets : ' - $(Q) echo - $(Q) fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'| column -s: -t + $(Q) awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-10s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST) # Dependencies diff --git a/README.md b/README.md index fa0ce7f9..5ea6311c 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ USAGE: drone-cache [global options] command [command options] [arguments...] VERSION: - v1.1.0-rc0-dirty + v1.1.0-rc0-5-gd70a765-dirty COMMANDS: help, h Shows a list of commands or help for one command @@ -220,29 +220,27 @@ $ docker run --rm \ [embedmd]:# (tmp/make_help.txt) ```txt -usage: make [target] ... - -targets : - -setup Setups dev environment -drone-cache Runs drone-cache target -build Runs build target -release Release dron-cache -snapshot Creates snapshot release without publishing it -clean Cleans build resourcess -docs Generates docs -vendor Updates vendored copy of dependencies -compress Creates compressed binary -container Builds drone-cache docker image with latest tag -container-push Pushes latest $(DOCKER_REPO) image to repository -test Runs tests -test-integration Runs integration tests -test-unit Runs unit tests -test-e2e Runs e2e tests -lint Runs golangci-lint analysis -fix Runs golangci-lint fix -format Runs gofmt -help Shows this help message +setup Setups dev environment +drone-cache Runs drone-cache target +build Runs build target +release Release dron-cache +snapshot Creates snapshot release without publishing it +clean Cleans build resourcess +docs Generates docs +generate Generate documentation, website and yaml files, +vendor Updates vendored copy of dependencies +compress Creates compressed binary +container Builds drone-cache docker image with latest tag +container-push Pushes latest $(DOCKER_REPO) image to repository +test Runs tests +test-integration Runs integration tests +test-unit Runs unit tests +test-e2e Runs e2e tests +lint Runs golangci-lint analysis +fix Runs golangci-lint fix +format Runs gofmt +help Shows this help message + $(Q) awk 'BEGIN {FS = " .*"; printf "\nUsage \n make \033[36m\033[0m\n\nTargets \n"} /^[a-zA-Z_-]+ .*?##/ { printf " \033[36m%-10s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST) ``` ## Releases