improve the Makefile

The Makefile commands sometimes wheren't working correctly.
This changes should help with that.
This commit is contained in:
Andreas Zweili 2019-10-22 21:37:03 +02:00
parent 2c5bac292a
commit b62c510524
2 changed files with 6 additions and 9 deletions

View File

@ -2,8 +2,9 @@ SHELL=/bin/bash
.PHONY: run
run: venv
run: venv/production
( \
source venv/bin/activate; \
export DJANGO_SETTINGS_MODULE=sensors.settings.production; \
./sensors/manage.py makemigrations; \
./sensors/manage.py migrate; \
@ -25,17 +26,12 @@ venv/development:
)
touch venv/development
venv:
venv/production:
test -d venv || python3 -m venv venv --system-site-packages
( \
source venv/bin/activate; \
pip3 install -r requirements/base.txt; \
)
venv/bin/activate: venv
( \
source venv/bin/activate; \
touch venv/bin/activate; \
pip3 install -Ur requirements/production.txt; \
touch venv/bin/activate: \
)
clean:

View File

@ -0,0 +1 @@
-r base.txt