-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathMakefile
75 lines (52 loc) · 1.77 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
.PHONY: help
.DEFAULT_GOAL := help
define PRINT_HELP_PYSCRIPT
import re, sys
for line in sys.stdin:
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
if match:
target, help = match.groups()
print("%-30s %s" % (target, help))
endef
export PRINT_HELP_PYSCRIPT
help:
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
flake8: ## lint
poetry run flake8 tifa
mypy: ## mypy
poetry run mypy tifa
publish: ## publish package to pypi
poetry publish --build
test: ## test
docker-compose run --rm tifa-toolbox-test bash -c "python -m pytest tests"
test.verbose: ## test.verbose
docker-compose run --rm tifa-toolbox-test bash -c "python -m pytest tests -v --pdb --pdbcls=IPython.terminal.debugger:Pdb"
format: ## publish package to pypi
poetry run ruff format .
shell_plus:
docker-compose run --rm tifa-toolbox bash -c "tifa-cli shell_plus"
db.init:
docker-compose run --rm tifa-toolbox bash -c "tifa-cli db init"
db.makemigrations:
docker-compose run --rm tifa-toolbox bash -c "tifa-cli makemigrations"
db.migrate:
docker-compose run --rm tifa-toolbox bash -c "tifa-cli migrate"
docker-build: ## build and compose up
docker-compose build && docker-compose up
docker-build-no-cache: ## build --no-cache
docker-compose build --no-cache && docker-compose up
start: ## runserver
docker-compose run --rm --service-ports tifa-web
beat: ## beat
docker-compose up tifa-beat
worker: ## worker
docker-compose up tifa-worker
monitor: ## flower
docker-compose up tifa-monitor
watch-css: ## flower
npx tailwindcss -i ./tifa/static/css/input.css -o ./tifa/static/css/main.css --watch
# docker images
build-tifa: ## > tifa
docker build -t 'tifa:local' -f 'compose/app/Dockerfile' .
build-tifa-no-cache: ## > tifa
docker build -t 'tifa:local' -f 'compose/app/Dockerfile' --no-cache .