forked from final-israel/vmn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (43 loc) · 1.45 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
NAME=vmn
.PHONY: build upload dist check docs major _major minor _minor patch _patch rc _rc _build
build: check
_build: clean
@echo "Publishing"
vmn show ${EXTRA_SHOW_ARGS} --verbose vmn > .vmn/vmn/ver.yml
python3 ${PWD}/gen_ver.py
python3 setup.py sdist bdist_wheel
git checkout -- ${PWD}/version_stamp/version.py
upload:
twine upload ${PWD}/dist/*
major: check _major _build
_major:
@echo "Major Release"
vmn stamp -r major ${NAME}
minor: check _minor _build
_minor:
@echo "Minor Release"
vmn stamp -r minor ${NAME}
patch: check _patch _build
_patch:
@echo "Patch Release"
vmn stamp -r patch ${NAME}
rc: check _rc _build
_rc:
@echo "RC Release"
vmn stamp ${NAME}
$(eval EXTRA_SHOW_ARGS := --template [{major}][.{minor}][.{patch}][{prerelease}])
check:
@echo "-------------------------------------------------------------"
@echo "-------------------------------------------------------------"
@echo "-~ Running static checks --"
@echo "-------------------------------------------------------------"
black ${PWD}
@echo "-~ Running unit tests --"
${PWD}/tests/run_tests.sh
@echo "-------------------------------------------------------------"
@echo "-------------------------------------------------------------"
@echo "-------------------------------------------------------------"
clean:
git checkout -- ${PWD}/version_stamp/version.py
rm -rf ${PWD}/dist
rm -rf ${PWD}/build