-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (29 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
MANAGE := python manage.py
.PHONY: help
help: ## Show this help
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.PHONY: venv
venv: ## Make a new virtual environment
pipenv shell
.PHONY: install
install: venv ## Install or update dependencies
pipenv install
freeze: ## Pin current dependencies
pipenv run pip freeze > requirements.txt
migrate: ## Make and run migrations
$(MANAGE) makemigrations
$(MANAGE) migrate
collectstatic: ## Run collectstatic
$(MANAGE) collectstatic --noinput
changepassword: ## Change password superuser
$(MANAGE) changepassword admin@pm.me
.PHONY: createsuperuser
createsuperuser: ## Run the Django server
$(MANAGE) createsuperuser --email="admin@pm.me"
.PHONY: dumpdata
dumpdata: ## dumpdata on database
$(MANAGE) dumpdata --indent=4 --natural-foreign --natural-primary -e contenttypes --format=json tasks.collection > fixtures/collections.json
$(MANAGE) dumpdata --indent=4 --natural-foreign --natural-primary -e contenttypes --format=json tasks.task > fixtures/tasks.json
.PHONY: loaddata
loaddata: ## Load default data
$(MANAGE) loaddata fixtures/*.json