diff --git a/Makefile b/Makefile index d36978e..9755276 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ SOURCE_FILES?=$$(go list ./... | grep -v /vendor/) TEST_PATTERN?=. TEST_OPTIONS?= DEP?=$$(which dep) +VERSION?=$$(cat VERSION) ifeq ($(OS),Windows_NT) DEP_VERS=dep-windows-amd64 @@ -55,6 +56,9 @@ ci: test lint ## Run all the tests and code checks build: go build +release: ## Release new version + git tag | grep -q $(VERSION) && echo This version was released! Increase VERSION! || git tag $(VERSION) && git push origin $(VERSION) + # Absolutely awesome: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html help: @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'