forked from yoyowallet/django-idempotency-key
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (34 loc) · 1.15 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
build: clean database
clean:
find . -type f -name "*.pyc" -delete
find . -type f -name "*,cover" -delete
database:
psql -lqt | cut -d \| -f 1 | grep -wq idempotency-key || createdb idempotency-key
./manage.py migrate
static_analysis: pep8 xenon
pep8:
@echo "Running flake8 over codebase"
flake8 --ignore=E501,W391,F999 --exclude=migrations idempotency_key/
xenon:
@echo "Running xenon over codebase"
xenon --max-absolute B --max-modules B --max-average A --exclude test_*.py idempotency-key/\
test: static_analysis coverage
tox $(pytest_args)
coverage:
py.test --cov=idempotency_key tests/ --cov-report html
@echo Access the report here:
@echo file://${PWD}/htmlcov/index.html
bundle: static_analysis coverage
rm -r ./dist/
python setup.py sdist
release-test:
twine upload --repository-url https://test.pypi.org/legacy/ dist/django-idempotency-key-1.0.3.tar.gz
release: static_analysis coverage
twine upload dist/*
bump-major:
bump2version major
bump-minor:
bump2version minor
bump-patch:
bump2version patch
.PHONY: bump-major bump-minor bump-patch bundle clean coverage database pep8 release release-test static_analysis test virtualenv xenon