|
1 |
| -.PHONY: example test coverage translatable_strings update_translations |
| 1 | +.PHONY: example test coverage translatable_strings update_translations help |
| 2 | +.DEFAULT_GOAL := help |
2 | 3 |
|
3 |
| -example: |
| 4 | +example: ## Run the example application |
4 | 5 | python example/manage.py migrate --noinput
|
5 | 6 | -DJANGO_SUPERUSER_PASSWORD=p python example/manage.py createsuperuser \
|
6 | 7 | --noinput --username="$(USER)" --email="$(USER)@mailinator.com"
|
7 | 8 | python example/manage.py runserver
|
8 | 9 |
|
9 |
| -example_test: |
| 10 | +example_test: ## Run the test suite for the example application |
10 | 11 | python example/manage.py test example
|
11 | 12 |
|
12 |
| -test: |
| 13 | +test: ## Run the test suite |
13 | 14 | DJANGO_SETTINGS_MODULE=tests.settings \
|
14 | 15 | python -m django test $${TEST_ARGS:-tests}
|
15 | 16 |
|
16 |
| -test_selenium: |
| 17 | +test_selenium: ## Run frontend tests written with Selenium |
17 | 18 | DJANGO_SELENIUM_TESTS=true DJANGO_SETTINGS_MODULE=tests.settings \
|
18 | 19 | python -m django test $${TEST_ARGS:-tests}
|
19 | 20 |
|
20 |
| -coverage: |
| 21 | +coverage: ## Run the test suite with coverage enabled |
21 | 22 | python --version
|
22 | 23 | DJANGO_SETTINGS_MODULE=tests.settings \
|
23 | 24 | python -b -W always -m coverage run -m django test -v2 $${TEST_ARGS:-tests}
|
24 | 25 | coverage report
|
25 | 26 | coverage html
|
26 | 27 | coverage xml
|
27 | 28 |
|
28 |
| -translatable_strings: |
| 29 | +translatable_strings: ## Update the English '.po' file |
29 | 30 | cd debug_toolbar && python -m django makemessages -l en --no-obsolete
|
30 | 31 | @echo "Please commit changes and run 'tx push -s' (or wait for Transifex to pick them)"
|
31 | 32 |
|
32 |
| -update_translations: |
| 33 | +update_translations: ## Download updated '.po' files from Transifex |
33 | 34 | tx pull -a --minimum-perc=10
|
34 | 35 | cd debug_toolbar && python -m django compilemessages
|
35 | 36 |
|
36 | 37 | .PHONY: example/django-debug-toolbar.png
|
37 |
| -example/django-debug-toolbar.png: example/screenshot.py |
| 38 | +example/django-debug-toolbar.png: example/screenshot.py ## Update the screenshot in 'README.rst' |
38 | 39 | python $< --browser firefox --headless -o $@
|
39 | 40 | optipng $@
|
| 41 | + |
| 42 | +help: ## Help message for targets |
| 43 | + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \ |
| 44 | + | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' |
0 commit comments