-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
31 lines (25 loc) · 948 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
26
27
28
29
30
VERSION := $(shell git-semv now | sed -e 's/v//g')-$(shell git show --format='%h' --no-patch)
build:
docker build --platform linux/amd64 -t pyama/away-from-keyboard:$(VERSION) .
docker push pyama/away-from-keyboard:$(VERSION)
.PHONY: releasedeps
releasedeps: git-semv
.PHONY: git-semv
git-semv:
ifeq ($(shell uname),Linux)
which git-semv || (wget https://github.com/linyows/git-semv/releases/download/v1.2.0/git-semv_linux_x86_64.tar.gz && tar zxvf git-semv_linux_x86_64.tar.gz && sudo mv git-semv /usr/bin/)
else
which git-semv > /dev/null || brew tap linyows/git-semv
which git-semv > /dev/null || brew install git-semv
endif
## release_major: release nke (major)
release_major: releasedeps
git semv major --bump
.PHONY: release_minor
## release_minor: release nke (minor)
release_minor: releasedeps
git semv minor --bump
.PHONY: release_patch
## release_patch: release nke (patch)
release_patch: releasedeps
git semv patch --bump