-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
32 lines (27 loc) · 1.13 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
VIRTUAL_ENV ?= .venv
.PHONY: run
run: $(VIRTUAL_ENV)
$(VIRTUAL_ENV)/bin/pip install -r requirements.txt
$(VIRTUAL_ENV)/bin/pip install django-debug-toolbar
yarn install || npm install
$(VIRTUAL_ENV)/bin/python manage.py compilemessages -l de
$(VIRTUAL_ENV)/bin/python manage.py migrate
$(VIRTUAL_ENV)/bin/python manage.py populate
$(VIRTUAL_ENV)/bin/python manage.py runserver
.PHONY: makemessages
makemessages: $(VIRTUAL_ENV)
$(VIRTUAL_ENV)/bin/python manage.py makemessages -l de -d django --ignore=node_modules
$(VIRTUAL_ENV)/bin/python manage.py makemessages -l de -d djangojs --ignore=node_modules
.PHONY: test
test: $(VIRTUAL_ENV)
$(VIRTUAL_ENV)/bin/pip install coverage
$(VIRTUAL_ENV)/bin/coverage run --branch --omit=.venv/* manage.py test
$(VIRTUAL_ENV)/bin/coverage html --skip-covered
.PHONY: lint
lint: $(VIRTUAL_ENV)
$(VIRTUAL_ENV)/bin/pip install flake8 isort
$(VIRTUAL_ENV)/bin/isort api demo devicegroups devices devicetags devicetypes history Lagerregal locale locations mail main media network users devicedata
$(VIRTUAL_ENV)/bin/flake8
$(VIRTUAL_ENV):
python3 -m venv $(VIRTUAL_ENV)
$(VIRTUAL_ENV)/bin/pip install -U pip