diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ecd6d0e26f6076dd2c6f18209a67f7d2d4e7073..9ce69fe4cfff3c0d0d7cfaaf16ef22f208281b28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Version 0.6.0 - UNRELEASED +* **MAKE** `make help` display all tasks available with description + ## Version 0.5.0 - 2017-11-23 - [binaries](https://gitlab.com/itk.fr/lorhammer/tags/0.5.0) * **PROVISIONER** increase timeout for http requests [57](https://gitlab.com/itk.fr/lorhammer/issues/57) diff --git a/Makefile b/Makefile index fd70940b3b0106c79ad877260a07b22b6d5304e3..df1a8d6593fdc38a768586cbf24c57f711f22fcc 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ first: build $(DEP): go get -u github.com/golang/dep/cmd/dep -vendor: $(DEP) +vendor: $(DEP) ## Install dependencies dep ensure @@ -28,7 +28,7 @@ $(GOLINT): go get -u github.com/golang/lint/golint .PHONY: lint -lint: $(GOLINT) +lint: $(GOLINT) ## Start lint diff -u <(echo -n) <(gofmt -s -d ./src); [ $$? -eq 0 ] go tool vet -composites=false -shadow=true src/**/*.go diff -u <(echo -n) <(golint ./src/...); [ $$? -eq 0 ] @@ -38,11 +38,11 @@ lint: $(GOLINT) ## TEST ##### .PHONY: test -test: vendor +test: vendor ## Play test with race flag go test -race ./src/... .PHONY: cover -cover: vendor +cover: vendor ## Display test coverage percent ./resources/scripts/cover.sh -terminal @@ -50,7 +50,7 @@ cover: vendor ## BUILD ##### .PHONY: build -build: vendor +build: vendor ## Build lorhammer and orchestrator binaries rm -rf build go build -race -ldflags "-extldflags '-static' -X main.version=${VERSION} -X main.commit=${COMMIT} -X main.date=${DATE_BUILD}" -o "build/lorhammer" src/lorhammer/main.go go build -race -ldflags "-extldflags '-static' -X main.version=${VERSION} -X main.commit=${COMMIT} -X main.date=${DATE_BUILD}" -o "build/orchestrator" src/orchestrator/main.go @@ -59,13 +59,13 @@ build: vendor ## DOC ##### .PHONY: doc -doc: +doc: ## Make doc and put minified html into public directory ./resources/scripts/makeDoc.sh rm -rf doc/public mv doc/public_min public .PHONY: doc-dev -doc-dev: +doc-dev: ## Make doc, wtach files and launch a light weight http server to access ./resources/scripts/makeDoc.sh -dev @@ -73,10 +73,14 @@ doc-dev: ## CLEAN ##### .PHONY: clean -clean: +clean: ## Remove vendors, previous build and doc temporary files rm -rf vendor rm -rf build rm -rf doc/public rm -rf doc/public_min rm -rf doc/themes - rm -rf public \ No newline at end of file + rm -rf public + +.PHONY: help +help: ## Display this help screen + @grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' \ No newline at end of file