improve the Makefile
The Makefile commands sometimes wheren't working correctly. This changes should help with that.
This commit is contained in:
parent
2c5bac292a
commit
b62c510524
14
Makefile
14
Makefile
|
@ -2,8 +2,9 @@ SHELL=/bin/bash
|
||||||
|
|
||||||
.PHONY: run
|
.PHONY: run
|
||||||
|
|
||||||
run: venv
|
run: venv/production
|
||||||
( \
|
( \
|
||||||
|
source venv/bin/activate; \
|
||||||
export DJANGO_SETTINGS_MODULE=sensors.settings.production; \
|
export DJANGO_SETTINGS_MODULE=sensors.settings.production; \
|
||||||
./sensors/manage.py makemigrations; \
|
./sensors/manage.py makemigrations; \
|
||||||
./sensors/manage.py migrate; \
|
./sensors/manage.py migrate; \
|
||||||
|
@ -25,17 +26,12 @@ venv/development:
|
||||||
)
|
)
|
||||||
touch venv/development
|
touch venv/development
|
||||||
|
|
||||||
venv:
|
venv/production:
|
||||||
test -d venv || python3 -m venv venv --system-site-packages
|
test -d venv || python3 -m venv venv --system-site-packages
|
||||||
( \
|
( \
|
||||||
source venv/bin/activate; \
|
source venv/bin/activate; \
|
||||||
pip3 install -r requirements/base.txt; \
|
pip3 install -Ur requirements/production.txt; \
|
||||||
)
|
touch venv/bin/activate: \
|
||||||
|
|
||||||
venv/bin/activate: venv
|
|
||||||
( \
|
|
||||||
source venv/bin/activate; \
|
|
||||||
touch venv/bin/activate; \
|
|
||||||
)
|
)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
-r base.txt
|
Loading…
Reference in New Issue