2014-08-07 15:11:48 +04:00
|
|
|
.PHONY: help docs test test_force_db tdd test_failed update_code update_submodules update_deps update_db update_assets update_landfill full_update reindex
|
2013-11-20 15:00:42 +04:00
|
|
|
|
|
|
|
help:
|
|
|
|
@echo "Please use \`make <target>' where <target> is one of"
|
2014-08-07 15:11:48 +04:00
|
|
|
@echo " docs to builds the docs for Zamboni"
|
|
|
|
@echo " test to run all the test suite"
|
|
|
|
@echo " test_force_db to run all the test suite with a new database"
|
|
|
|
@echo " tdd to run all the test suite, but stop on the first error"
|
|
|
|
@echo " test_failed to rerun the failed tests from the previous run"
|
|
|
|
@echo " update_code to update the git repository and submodules"
|
|
|
|
@echo " update_submodules to only update the submodules"
|
|
|
|
@echo " update_deps to update the python and npm dependencies"
|
|
|
|
@echo " update_db to run the database migrations"
|
|
|
|
@echo " full_update to update the code, the dependencies and the database"
|
|
|
|
@echo " update_landfill to load the landfill database data"
|
|
|
|
@echo " reindex to reindex everything in elasticsearch, for AMO"
|
|
|
|
@echo "Check the Makefile to know exactly what each target is doing. If you see a "
|
2013-11-20 15:00:42 +04:00
|
|
|
|
|
|
|
docs:
|
|
|
|
$(MAKE) -C docs html
|
|
|
|
|
|
|
|
test:
|
2014-08-08 16:08:46 +04:00
|
|
|
python manage.py test --with-blockage --noinput --logging-clear-handlers --with-id -v 2 $(ARGS)
|
2013-11-20 15:00:42 +04:00
|
|
|
|
|
|
|
test_force_db:
|
2014-08-08 16:08:46 +04:00
|
|
|
FORCE_DB=1 python manage.py test --with-blockage --noinput --logging-clear-handlers --with-id -v 2 $(ARGS)
|
2013-11-20 15:00:42 +04:00
|
|
|
|
|
|
|
tdd:
|
2014-08-08 16:08:46 +04:00
|
|
|
python manage.py test --with-blockage --noinput --failfast --pdb --with-id -v 2 $(ARGS)
|
2013-11-20 15:00:42 +04:00
|
|
|
|
|
|
|
test_failed:
|
2014-08-08 16:08:46 +04:00
|
|
|
python manage.py test --with-blockage --noinput --logging-clear-handlers --with-id -v 2 --failed $(ARGS)
|
2013-11-20 15:00:42 +04:00
|
|
|
|
2014-04-22 13:17:21 +04:00
|
|
|
update_code:
|
2014-08-07 15:11:48 +04:00
|
|
|
git checkout master && git pull
|
|
|
|
$(MAKE) update_submodules
|
|
|
|
|
|
|
|
update_submodules:
|
|
|
|
git submodule --quiet foreach 'git submodule --quiet sync'
|
|
|
|
git submodule --quiet sync && git submodule update --init --recursive
|
2014-04-22 13:17:21 +04:00
|
|
|
|
|
|
|
update_deps:
|
2014-02-27 04:43:26 +04:00
|
|
|
pip install --no-deps --exists-action=w --download-cache=/tmp/pip-cache -r requirements/dev.txt --find-links https://pyrepo.addons.mozilla.org/ --allow-external PIL --allow-unverified PIL
|
2013-12-12 01:15:12 +04:00
|
|
|
npm install
|
|
|
|
|
2014-04-22 13:17:21 +04:00
|
|
|
update_db:
|
|
|
|
schematic migrations
|
2013-11-20 15:00:42 +04:00
|
|
|
|
2014-06-04 13:08:02 +04:00
|
|
|
update_assets:
|
2014-08-08 16:08:46 +04:00
|
|
|
python manage.py compress_assets
|
|
|
|
python manage.py collectstatic --noinput
|
2014-06-04 13:08:02 +04:00
|
|
|
|
|
|
|
full_update: update_code update_deps update_db update_assets
|
2014-04-22 13:17:21 +04:00
|
|
|
|
|
|
|
update_landfill:
|
2014-08-08 16:08:46 +04:00
|
|
|
python manage.py install_landfill $(ARGS)
|
2013-11-20 15:00:42 +04:00
|
|
|
|
|
|
|
reindex:
|
2014-08-08 16:08:46 +04:00
|
|
|
python manage.py reindex $(ARGS)
|