forked from osuAkatsuki/bancho.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (34 loc) · 1.03 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
#!/usr/bin/env make
build:
if [ -d ".dbdata" ]; then sudo chmod -R 755 .dbdata; fi
docker build -t bancho:latest .
run:
docker compose up bancho mysql redis
run-bg:
docker compose up -d bancho mysql redis
run-caddy:
caddy run --envfile .env --config ext/Caddyfile
last?=1
logs:
docker compose logs -f bancho mysql redis --tail ${last}
shell:
poetry shell
test:
docker compose -f docker-compose.test.yml up -d bancho-test mysql-test redis-test
docker compose -f docker-compose.test.yml exec -T bancho-test /srv/root/scripts/run-tests.sh
lint:
poetry run pre-commit run --all-files
type-check:
poetry run mypy .
install:
POETRY_VIRTUALENVS_IN_PROJECT=1 poetry install --no-root
install-dev:
POETRY_VIRTUALENVS_IN_PROJECT=1 poetry install --no-root --with dev
poetry run pre-commit install
uninstall:
poetry env remove python
# To bump the version number run `make bump version=<major/minor/patch>`
# (DO NOT USE IF YOU DON'T KNOW WHAT YOU'RE DOING)
# https://python-poetry.org/docs/cli/#version
bump:
poetry version $(version)