-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
31 lines (22 loc) · 1005 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
COMPOSE = docker-compose -f docker-compose.yaml
help:
@echo "help -- Print this help showing all commands. "
@echo "build -- Build containers. "
@echo "up -- Run the webserver. "
@echo "manage -- Run django 'manage.py' command. "
@echo " Ex. make manage CMD=\"migrate\" "
@echo "flake8 -- Run flake8 tool. "
@echo "pytest -- Run pytest tool. "
rmpyc:
find . | grep -E "__pycache__|\.pyc|\.pyo" | xargs sudo rm -rf
build: #rmpyc
$(COMPOSE) build
up:
$(COMPOSE) up
manage:
$(COMPOSE) run --rm src python manage.py ${CMD}
flake8:
$(COMPOSE) run --rm src /bin/bash -c "flake8 . --exclude migrations,settings.py --max-line-length 90"
pytest:
$(COMPOSE) run --rm src /bin/bash -c "pytest ."
.PHONY: help rmpyc build up manage flake8 pytest