-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
25 lines (21 loc) · 815 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.PHONY: build release-major release-minor release-patch
build:
go build -o ./bin/server ./cmd/server
release-major:
$(eval MAJORVERSION=$(shell git describe --tags --abbrev=0 | sed s/v// | awk -F. '{print $$1+1".0.0"}'))
git checkout master
git pull
git tag -a $(MAJORVERSION) -m 'Release $(MAJORVERSION)'
git push origin --tags
release-minor:
$(eval MINORVERSION=$(shell git describe --tags --abbrev=0 | sed s/v// | awk -F. '{print $$1"."$$2+1".0"}'))
git checkout master
git pull
git tag -a $(MINORVERSION) -m 'Release $(MINORVERSION)'
git push origin --tags
release-patch:
$(eval PATCHVERSION=$(shell git describe --tags --abbrev=0 | sed s/v// | awk -F. '{print $$1"."$$2"."$$3+1}'))
git checkout master
git pull
git tag -a $(PATCHVERSION) -m 'Release $(PATCHVERSION)'
git push origin --tags