-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
58 lines (44 loc) · 1.61 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
NAME=pytest_playbook_runner
.PHONY: build _build check-local dist check docs major _major minor _minor patch _patch _debug _publish check-local
build: check _debug _build
_build:
@echo "Building"
_publish: clean
@echo "Publishing"
vmn show --verbose ${NAME} > ver.yml
python3 ${PWD}/gen_ver.py
python3 setup.py sdist bdist_wheel
twine upload ${PWD}/dist/*
git checkout -- ${PWD}/version.py
rm -rf ${PWD}/dist
rm -rf ${PWD}/build
major: check _major _build _publish
_major:
@echo "Major Release"
$(eval VERSION := $(shell vmn stamp -r major ${NAME}))
minor: check _minor _build _publish
_minor:
@echo "Minor Release"
$(eval VERSION := $(shell vmn stamp -r minor ${NAME}))
patch: check _patch _build _publish
_patch:
@echo "Patch Release"
$(eval VERSION := $(shell vmn stamp -r patch ${NAME}))
_debug:
@echo "Debug Release"
$(eval VERSION := $(shell vmn show ${NAME}))
check: check-local
check-local:
@echo "-------------------------------------------------------------"
@echo "-------------------------------------------------------------"
@echo "-~ Running static checks --"
@echo "-------------------------------------------------------------"
@echo "-------------------------------------------------------------"
@echo "-~ Running unit tests --"
@echo "-------------------------------------------------------------"
@echo "-------------------------------------------------------------"
@echo "-------------------------------------------------------------"
clean:
git checkout -- ${PWD}/version.py
rm -rf ${PWD}/dist
rm -rf ${PWD}/build