-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
69 lines (46 loc) · 1.25 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
init-env:
python3 -m venv .env
install:
pip install pip-tools && CFLAGS="-Wno-error=implicit-function-declaration" pip install -r requirements.txt && npm install
install-test:
pip install -r requirements-test.txt
install-dev:
pip install -r requirements-dev.txt
run:
DEBUG=1 DEBUG_TOOLBAR=1 ./node_modules/.bin/concurrently -r -k "python manage.py runserver 8080" "./node_modules/.bin/webpack --config webpack.config.js --mode development --watch"
dep-freeze:
pip-compile requirements.in
test:
pytest
migrate:
DEBUG=1 python manage.py migrate
migrations:
DEBUG=1 python manage.py makemigrations
build-assets:
./node_modules/.bin/webpack --config webpack.config.js --mode production
build-image:
docker buildx build --platform linux/amd64 -t xaralis/ksicht:latest .
build:
make build-assets
make build-image
push:
docker push xaralis/ksicht:latest
release:
make build
make push
# --- code checks ---
MODULES ?= ksicht tests
ALL_MODULES ?= $(MODULES)
.PHONY: code-checks
code-checks: pylint isort black
PYLINT_ARGS ?=
.PHONY: pylint
pylint: ## lint code
pylint $(PYLINT_ARGS) $(ALL_MODULES)
BLACK_ARGS ?=
.PHONY: black
black: ## check code formating
black $(BLACK_ARGS) $(ALL_MODULES)
.PHONY: isort
isort:
isort --profile black $(ALL_MODULES)