forked from springload/wagtail-django-recaptcha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (27 loc) · 1.69 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
.PHONY: helpt init start testapp lint test test-coverage test-ci clean-pyc publish update-test-fixture
.DEFAULT_GOAL := help
help: ## See what commands are available.
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36mmake %-15s\033[0m # %s\n", $$1, $$2}'
init: clean-pyc ## Install dependencies and initialise for development.
pip install -e .[testing,docs] -U
python ./tests/testapp/manage.py migrate
python ./tests/testapp/manage.py loaddata test_data
start: ## Starts the development server.
python ./tests/testapp/manage.py runserver
lint: ## Lint the project.
flake8 wagtailcaptcha tests setup.py
isort --check-only --diff --recursive wagtailcaptcha tests setup.py
test: ## Test the project.
python ./runtests.py
test-coverage: ## Run the tests while generating test coverage data.
coverage run ./runtests.py && coverage report && coverage html
test-ci: ## Continuous integration test suite.
tox
update-test-fixture: ## Update test fixture from the db.
python ./tests/testapp/manage.py dumpdata --indent=4 -e contenttypes -e auth.permission -e auth.group -e sessions -e wagtailcore.site -e wagtailcore.pagerevision -e wagtailcore.grouppagepermission -e wagtailimages.rendition -e wagtailcore.collection -e wagtailcore.groupcollectionpermission > tests/testapp/fixtures/test_data.json
clean-pyc: ## Remove Python file artifacts.
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
publish: ## Publishes a new version to pypi.
rm dist/* && python setup.py sdist && twine upload dist/* && echo 'Success! Go to https://pypi.python.org/pypi/wagtail-django-recaptcha and check that all is well.'