2020-02-17 20:58:07 +00:00
|
|
|
.PHONY: help
|
|
|
|
|
|
|
|
help:
|
|
|
|
@grep -E '^[a-zA-Z_-]+:.*?# .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?# "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
|
|
|
|
|
|
|
|
|
|
|
install: # Install base requirements to run project
|
2016-03-05 08:29:26 +00:00
|
|
|
pip install -r requirements.txt
|
2014-12-04 11:11:46 +00:00
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
dev-install: # Install developer requirements + base requirements
|
2016-03-05 09:27:25 +00:00
|
|
|
pip install -r test-requirements.txt
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
setup: # Set up the project database
|
2014-12-04 11:11:46 +00:00
|
|
|
python manage.py migrate --settings=config.local
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
wipe_db: # Delete's the project database
|
2014-12-04 11:11:46 +00:00
|
|
|
rm -rf db.sqlite3
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
serve: # Run the project locally
|
2014-12-04 11:11:46 +00:00
|
|
|
python manage.py runserver --settings=config.local
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
test: # Run tests
|
2014-12-15 10:13:52 +00:00
|
|
|
python manage.py test --settings=config.local
|
2014-12-04 11:11:46 +00:00
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
clean: # Remove any pyc files
|
2016-06-25 14:42:39 +00:00
|
|
|
find . -type f -name '*.pyc' -delete
|
2016-04-30 14:36:56 +00:00
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
migrate: # run any outstanding migrations
|
2016-04-30 14:36:56 +00:00
|
|
|
python manage.py migrate --settings=config.local
|
2019-01-04 14:35:35 +00:00
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
shell: # Load a shell
|
2019-01-04 14:35:35 +00:00
|
|
|
python manage.py shell --settings=config.local
|
2020-02-17 20:58:07 +00:00
|
|
|
|
|
|
|
format: # Format the source code
|
|
|
|
black .
|
|
|
|
|
|
|
|
format-check: # Check the source code has been formatted
|
|
|
|
black . --check
|