-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
67 lines (55 loc) · 1.33 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
59
60
61
62
63
64
65
66
67
define banner
@echo
@echo "############################################################"
@echo "# $(1) "
@echo "############################################################"
endef
######################################################################
# PYPI
######################################################################
#
# USAGE:
#
# make patch
# make release
#release:
# python setup.py sdist bdist_wheel
# twine check dist/*
# twine upload --repository pypi dist/*
twine:
pip install -U twine
dist:
python setup.py sdist bdist_wheel
twine check dist/*
patch: clean twine
$(call banner, "patch")
bump2version --allow-dirty patch
python setup.py sdist bdist_wheel
git push origin main --tags
twine check dist/*
twine upload --repository testpypi dist/*
minor: clean
$(call banner, "minor")
bump2version minor --allow-dirty
@cat VERSION
@echo
release: clean
$(call banner, "release")
git tag "v$(VERSION)"
git push origin main --tags
python setup.py sdist bdist_wheel
twine check dist/*
twine upload --repository pypi dist/*
$(call banner, "install")
@cat VERSION
@echo
dev:
bump2version --new-version "$(VERSION)-dev0" part --allow-dirty
bump2version patch --allow-dirty
@cat VERSION
@echo
reset:
bump2version --new-version "4.0.0-dev0" part --allow-dirty
upload:
twine check dist/*
twine upload dist/*