-
Notifications
You must be signed in to change notification settings - Fork 34
/
Makefile
48 lines (41 loc) · 1.58 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
.PHONY: release dist readme test lint coverage clean
release: readme dist
git diff --exit-code # ensure there are no uncommitted changes
git tag -a \
-m v`python -c 'import markdown_checklist; print(markdown_checklist.__version__)'` \
v`python -c 'import markdown_checklist; print(markdown_checklist.__version__)'`
git push origin master --tags
twine upload dist/*
dist: clean test
rm -r dist || true
python setup.py sdist
readme:
python -c "import markdown_checklist as cl; print(cl.__doc__.strip())" > README
sed -i "2i[![build status](https://secure.travis-ci.org/FND/markdown-checklist.png)](http://travis-ci.org/FND/markdown-checklist)" README
sed -i "3i[![coverage](https://coveralls.io/repos/FND/markdown-checklist/badge.png)](https://coveralls.io/r/FND/markdown-checklist)" README
test: clean
py.test -s --tb=short test
lint:
find . -name "*.py" -not -path "./venv/*" | while read filepath; do \
pep8 --ignore=E128,E261 $$filepath; \
done
#upyflakes $$filepath; \
#pylint --reports=n --include-ids=y $$filepath; \
coverage: clean
# option #1: figleaf
find . test -name "*.py" > coverage.lst
figleaf `which py.test` test
figleaf2html -f coverage.lst
# option #2: coverage
coverage run `which py.test` test
coverage html
# reports
coverage report
@echo "[INFO] additional reports in \`html/index.html\` (figleaf) and" \
"\`htmlcov/index.html\` (coverage)"
clean:
find . -name "*.pyc" -print0 | xargs -0 rm || true
rm -rf html .figleaf coverage.lst # figleaf
rm -rf htmlcov .coverage # coverage
rm -rf test/__pycache__ # pytest
rm -r markdown_checklist.egg-info || true