-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
38 lines (27 loc) · 1.06 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
default: help
.PHONY: help clean pre-commit lint test bump
VENV_DIR = .venv
help:
@grep -E '^[a-zA-Z0-9 -]+:.*#' Makefile | sort | while read -r l; do printf "\033[1;32m$$(echo $$l | cut -f 1 -d':')\033[00m:$$(echo $$l | cut -f 2- -d'#')\n"; done
venv: ${VENV_DIR}/.touchfile
${VENV_DIR}/.touchfile: poetry.lock
poetry install --sync
touch ${VENV_DIR}/.touchfile
poetry.lock: pyproject.toml
poetry lock --no-update
touch poetry.lock
clean:
rm -rf ${VENV_DIR}
poetry run ruff clean
pre-commit: .git/hooks/pre-commit .git/hooks/commit-msg
.git/hooks/pre-commit:
pre-commit install
.git/hooks/commit-msg:
pre-commit install --hook-type commit-msg
lint: venv
poetry run ruff check poetry_plugin_mono_repo_deps tests
poetry run mypy --config-file pyproject.toml poetry_plugin_mono_repo_deps tests
test: venv
NO_COLOR=1 poetry run python -m pytest --cov poetry_plugin_mono_repo_deps --cov-config pyproject.toml --cov-report xml:coverage/coverage.xml --cov-report term-missing --junitxml=coverage/report.xml -vv -p no:toolbox tests
bump: venv
poetry run cz bump --retry