helper script
[wolnelektury.git] / Makefile
1 .PHONY: deploy test shell
2
3
4 UID != id -u
5 GID != id -g
6
7
8 deploy: src/wolnelektury/localsettings.py
9         pip install -r requirements/requirements.txt
10         src/manage.py migrate --noinput
11         src/manage.py update_counters
12         src/manage.py collectstatic --noinput
13
14
15 .ONESHELL:
16 test:
17         cd src
18         python -Wall -m coverage run --branch --source='.' ./manage.py test; true
19         coverage html -d ../htmlcov.new
20         rm -rf ../htmlcov
21         mv ../htmlcov.new ../htmlcov
22         coverage report
23         rm .coverage
24
25
26 shell:
27         UID=$(UID) GID=$(GID) docker-compose run --rm dev bash
28
29
30 build:
31         UID=$(UID) GID=$(GID) docker-compose build dev