forked from KSICHT-org/ksicht
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
85 lines (62 loc) · 1.94 KB
/
Copy pathMakefile
File metadata and controls
85 lines (62 loc) · 1.94 KB
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
76
77
78
79
80
81
82
83
84
85
#######################
# commands are intended for use on UNIX (and UNIX-like) systems
# some commands have their Windows variants, intended to be used inside PowerShell, starting with 'win-'
# before invoking these commands, make sure to run debugEnv.ps1 script
# Windows variants won't work properly in CMD!
#######################
init-env:
python3 -m venv .venv
win-init-env:
python -m venv .venv
install:
pip install pip-tools && CFLAGS="-Wno-error=implicit-function-declaration" pip install -r requirements.txt && npm install
win-install:
pip install pip-tools & 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"
win-run:
.\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
win-migrate:
python manage.py migrate
migrations:
DEBUG=1 python manage.py makemigrations
win-migrations:
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 ksicht/web:latest .
build:
make build-assets
make build-image
push:
docker push ksicht/web: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)