Skip to content

Commit 5469272

Browse files
author
Jan Seidl
committed
release make rule
1 parent dc6fb01 commit 5469272

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ SOURCE_FILES?=$$(go list ./... | grep -v /vendor/)
22
TEST_PATTERN?=.
33
TEST_OPTIONS?=
44
DEP?=$$(which dep)
5+
VERSION?=$$(cat VERSION)
56

67
ifeq ($(OS),Windows_NT)
78
DEP_VERS=dep-windows-amd64
@@ -55,6 +56,9 @@ ci: test lint ## Run all the tests and code checks
5556
build:
5657
go build
5758

59+
release: ## Release new version
60+
git tag | grep -q $(VERSION) && echo This version was released! Increase VERSION! || git tag $(VERSION) && git push origin $(VERSION)
61+
5862
# Absolutely awesome: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
5963
help:
6064
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

0 commit comments

Comments
 (0)