-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
35 lines (30 loc) · 970 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
31
32
33
34
35
CLIENT_VERSION=$(shell grep 'version=' client/setup.py | grep -Eo '([[:digit:]]|\.)+')
DAEMON_VERSION=$(shell grep 'version=' daemon/setup.py | grep -Eo '([[:digit:]]|\.)+')
.PHONY: help
help:
@echo "These are our make targets and what they do."
@echo ""
@echo " help: Show this helptext"
@echo ""
@echo " lint: run linters and fixers"
@echo ""
@echo " clean: remove tooling virtualenv"
.venv:
python3 -m venv .venv
.venv/bin/pip install pre-commit==1.18.3
.PHONY: lint
lint: .venv
.venv/bin/pre-commit run --all-files
.PHONY: clean
clean:
rm -rf .venv
.PHONY: showvars tag-release prepare-release
showvars:
@echo "VERSION=$(CLIENT_VERSION)"
@echo "CLIENT_VERSION=$(CLIENT_VERSION)"
@echo "DAEMON_VERSION=$(DAEMON_VERSION)"
prepare-release:
tox -e prepare-release
tag-release:
git tag -s "$(CLIENT_VERSION)" -m "v$(CLIENT_VERSION)"
-git push $(shell git rev-parse --abbrev-ref @{push} | cut -d '/' -f1) refs/tags/$(CLIENT_VERSION)