-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (34 loc) · 1.01 KB
/
Makefile
File metadata and controls
52 lines (34 loc) · 1.01 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
VERSION = 0.0.7
all: check
lint: ruff-lint ruff-lint-format-check lint-types
ruff-lint:
uvx ruff check .
ruff-lint-format-check:
uvx ruff format .
uvx ruff format --check .
lint-types:
uv run basedpyright .
test:
FLASK_ENV=testing FLASK_APP=blog uv run pytest
test-dev:
FLASK_ENV=testing FLASK_APP=blog uv run pytest -vv -s
test-coverage:
FLASK_ENV=testing FLASK_APP=blog uv run pytest --cov=blog --cov-report xml
check: lint test
css-build:
npm install
npx webpack --mode production
run:
uv run flask db upgrade
npx webpack --mode production # Build CSS before running the app
uv run flask run --host="0.0.0.0" --debug
docker-build:
docker build . --tag="gunlinux:$(VERSION)"
docker:
-docker stop gunlinux
-docker rm gunlinux
docker run --rm -d --name gunlinux -v /home/loki/projects/gunlinux.ru/tmp:/app/tmp -p 5000:5000 gunlinux:$(VERSION)
docker-shell:
docker run --rm -it --entrypoint="" gunlinux:$(VERSION) sh
docker-test:
docker build --target test-image -t gunlinux:$(VERSION)-test .