forked from vintasoftware/django-react-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (39 loc) · 1.51 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
40
41
42
43
44
45
46
47
48
ARG := $(word 2, $(MAKECMDGOALS) )
clean:
@find . -name "*.pyc" -exec rm -rf {} \;
@find . -name "__pycache__" -delete
test:
python backend/manage.py test $(ARG) --parallel --keepdb
dockertest:
docker-compose run backend python backend/manage.py test $(ARG) --parallel --keepdb
testreset:
python backend/manage.py test $(ARG) --parallel
dockertestreset:
docker-compose run backend python backend/manage.py test $(ARG) --parallel
backend_format:
black backend
upgrade: ## update the *requirements.txt files with the latest packages satisfying *requirements.in
pip install -U -q pip-tools
pip-compile --upgrade -o dev-requirements.txt dev-requirements.in
pip-compile --upgrade -o requirements.txt requirements.in
# Make everything =>, not ==
sed 's/==/>=/g' requirements.txt > requirements.tmp
mv requirements.tmp requirements.txt
clean_examples:
# Remove the tables specific for the example app
python manage.py migrate exampleapp zero
# Removing backend example app files
rm -rf ./backend/exampleapp
# Removing frontend example app files
rm -rf ./frontend/js/app/example-app
# Removing example templates files
rm -rf ./backend/templates/exampleapp
compile_install_requirements:
@echo 'Installing pip-tools...'
export PIP_REQUIRE_VIRTUALENV=true; \
pip install pip-tools
@echo 'Compiling requirements...'
pip-compile requirements.in > requirements.txt
pip-compile dev-requirements.in > dev-requirements.txt
@echo 'Installing requirements...'
pip install -r requirements.txt && pip install -r dev-requirements.txt