forked from marcwebbie/passpie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
97 lines (69 loc) · 2.29 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
PACKAGE=passpie
PACKAGE_TESTS=tests
all: clean develop lint coverage news
test:
python -W ignore setup.py -q test
integration-test: install
bash -x tests/cli.bash
install:
pip install -U --editable .
release:
pip install -U -r requirements/release.txt
develop: release install
pip install -U -r requirements/test.txt
clean:
find $(PACKAGE) -name \*.pyc -delete
find $(PACKAGE) -name \*__pycache__ -delete
find $(PACKAGE_TESTS) -name \*.pyc -delete
find $(PACKAGE_TESTS) -name \*__pycache__ -delete
python setup.py clean -q --all
rm -rf MANIFEST || true
rm -rf build-* || true
rm -rf *egg* || true
rm -rf dist || true
rm -rf __pycache__ || true
coverage:
python setup.py coverage
docs:
$(MAKE) -C docs/ clean
$(MAKE) -C docs/ html
serve: docs
cd docs/_build/html && python3 -m http.server
package:
pip install -U pip wheel
python setup.py -q sdist bdist_wheel
@echo
@echo "Build files [dist]:"
@echo "--------------------------"
@ls -l ./dist/
lint: clean
flake8
grep -inr "set_trace()" --color=auto $(PACKAGE) || true
grep -inr "set_trace()" --color=auto $(PACKAGE_TESTS) || true
publish:
python setup.py sdist bdist_wheel upload
tag:
python setup.py tag
formula:
poet -f passpie > passpie.rb
bump-patch:
bumpversion patch setup.py passpie/cli.py
bump-minor:
bumpversion minor setup.py passpie/cli.py
bump-major:
bumpversion major setup.py passpie/cli.py
news:
@echo "################################################"
@echo "Commits not included in last version"
@echo "################################################"
@git log `git describe --tags --abbrev=0`..HEAD --pretty=format:"+ **✔** %s"
ensure-news-patch:
grep 'Version $(shell bumpversion --allow-dirty --dry-run --list patch | grep new_version | sed s,"^.*=",,)' NEWS.rst
ensure-news-minor:
grep 'Version $(shell bumpversion --allow-dirty --dry-run --list minor | grep new_version | sed s,"^.*=",,)' NEWS.rst
ensure-news-major:
grep 'Version $(shell bumpversion --allow-dirty --dry-run --list major | grep new_version | sed s,"^.*=",,)' NEWS.rst
release-patch: ensure-news-patch lint test bump-patch package publish tag formula
release-minor: ensure-news-minor lint test bump-minor package publish tag formula
release-major: ensure-news-major lint test bump-major package publish tag formula
.PHONY: docs news