-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
31 lines (23 loc) · 955 Bytes
/
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
SHELL := /bin/bash
PYTHON_BIN = $(shell cd server && pipenv --venv)/bin/python
python_bin:
pushd server; pipenv install --dev; popd;
database: python_bin
$(PYTHON_BIN) ./server/manage.py makemigrations api --noinput
$(PYTHON_BIN) ./server/manage.py migrate --noinput
fixtures: python_bin
$(PYTHON_BIN) ./server/manage.py createsuperuser --username=root --email=root@example.com --noinput
$(PYTHON_BIN) ./server/manage.py create_fixtures
server-dev: python_bin
$(PYTHON_BIN) ./server/manage.py runserver --settings=server.settings
client/node_modules:
yarn --cwd=./client install
client-dist: client/node_modules
yarn --cwd=./client run build
clean:
find . -name \*.pyc -o -name -delete
find . -name \*.pyo -o -name -delete
find . -name __pycache__ -o -name -delete
find . -path "./server/server/api/migrations/*.py" -not -name "__init__.py" -o -name -delete
rm -f server/db.sqlite3
all: clean database fixtures client-dist server-dev