-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
37 lines (32 loc) · 893 Bytes
/
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
.PHONY: help build up down manage shell bash test test_fast
ARGS := $(wordlist 2, $(words $(MAKECMDGOALS)), $(MAKECMDGOALS))
# Default target, display available commands
help:
@echo "Available commands:"
@echo " make build"
@echo " make up"
@echo " make down"
@echo " make bash"
@echo " make manage command"
@echo " make shell"
@echo " make test [test_name]"
@echo " make test_fast [test_name]"
# FIXME: "ENV" doesn't sound like the best option here.
ENV = docker compose
DJANGO_ENV = $(ENV) run --rm django
build:
${ENV} --progress plain build
up:
${ENV} up
down:
${ENV} down
bash:
${DJANGO_ENV} bash
manage:
${DJANGO_ENV} python manage.py $(ARGS)
shell:
${DJANGO_ENV} python manage.py shell_plus
test:
${DJANGO_ENV} python -Wd manage.py test --parallel=auto $(ARGS)
test_fast:
${DJANGO_ENV} python -Wd manage.py test --failfast --keepdb --parallel=auto $(ARGS)