-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (56 loc) · 1.6 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
72
73
74
75
DOCKER_COMPOSE_COMMAND := $(shell command -v docker-compose 2> /dev/null || echo "docker compose")
.PHONY: add-lib
add-lib:
poetry add $(filter-out $@,$(MAKECMDGOALS))
.PHONY: add-lib-dev
add-lib-dev:
poetry add $(filter-out $@,$(MAKECMDGOALS)) --group dev
.PHONY: add-roles
add-roles:
poetry run python -m src.manage add_default_roles src/accounts/permissions.json
.PHONY: del-add-dummy
del-add-dummy:
poetry run python -m src.manage add-dummy-data --delete
.PHONY: add-dummy
add-dummy:
poetry run python -m src.manage add-dummy-data
.PHONY: install
install:
poetry install
.PHONY: install-pre-commit
install-pre-commit:
poetry run pre-commit uninstall; poetry run pre-commit install
.PHONY: lint
lint:
poetry run pre-commit run --all-files
.PHONY: migrate
migrate:
poetry run python -m src.manage migrate
.PHONY: migrations
migrations:
poetry run python -m src.manage makemigrations
.PHONY: run-celery
run-celery:
poetry run celery -A src.project worker -l INFO
.PHONY: run-dependencies
run-dependencies:
test -f .env || touch .env
${DOCKER_COMPOSE_COMMAND} -f docker-compose.dev.yml up --force-recreate db redis
.PHONY: run-email-server
run-email-server:
poetry run python -m aiosmtpd -n -l localhost:8025
.PHONY: run-server
run-server:
poetry run python -m src.manage runserver
.PHONY: shell
shell:
poetry run python -m src.manage shell
.PHONY: superuser
superuser:
poetry run python -m src.manage createsuperuser
.PHONY: translate
translate:
poetry run python -m src.manage makemessages --all
poetry run python -m src.manage compilemessages
.PHONY: update
update: install migrate install-pre-commit ;