forked from Hexlet/hexlet-friends
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
71 lines (49 loc) · 1.52 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
install: .env
poetry install --extras psycopg2-binary
docker-install: .env
docker-compose build
.env:
test ! -f .env && cp .env.example .env
migrate:
poetry run python manage.py migrate
build:
poetry install --extras psycopg2-binary
poetry run python manage.py migrate
start-deploy:
gunicorn config.wsgi
setup: migrate
echo Create a super user
poetry run python manage.py createsuperuser
shell:
poetry run python manage.py shell_plus --plain
# Need to have GNU gettext installed
transprepare:
poetry run django-admin makemessages --locale ru --add-location file
poetry run django-admin makemessages --locale ru --add-location file --domain djangojs
transcompile:
poetry run django-admin compilemessages
collectstatic:
poetry run python manage.py collectstatic --no-input
lint:
poetry run flake8
test:
poetry run coverage run --source='.' manage.py test
test-coverage-report: test
poetry run coverage report -m $(ARGS)
poetry run coverage erase
test-coverage-report-xml:
poetry run coverage xml
check: lint test requirements.txt
start:
poetry run python manage.py runserver 127.0.0.1:8000
docker-start:
docker-compose up
sync:
poetry run python manage.py fetchdata $(ARGS)
secretkey:
poetry run python -c 'from django.utils.crypto import get_random_string; print(get_random_string(40))'
requirements.txt: poetry.lock
poetry export --format requirements.txt --output requirements.txt --extras psycopg2 --without-hashes
deploy:
git push heroku
.PHONY: install setup shell lint test check start sync secretkey