forked from jooola/earhorn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (31 loc) · 957 Bytes
/
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
.PHONY: install format lint test
SHELL = bash
CPU_CORES = $(shell nproc)
all: install format lint test
install-poetry:
curl -sSL https://install.python-poetry.org | python3 -
POETRY_VIRTUALENVS_IN_PROJECT = true
INSTALL_STAMP := .installed
install: $(INSTALL_STAMP)
$(INSTALL_STAMP):
poetry install
touch $(INSTALL_STAMP)
format: install
poetry run black .
poetry run isort . --profile black
lint: install
poetry run black . --diff --check
poetry run isort . --profile black --check
poetry run pylint --jobs=$(CPU_CORES) earhorn tests
poetry run mypy earhorn tests || true
test: install
poetry run pytest -n $(CPU_CORES) --color=yes -v --cov=earhorn tests
release: lint test
./scripts/release.sh
ci-publish:
poetry publish --no-interaction --build
changelog:
git-chglog --output CHANGELOG.md
if command -v npx > /dev/null; then npx prettier --write CHANGELOG.md; fi
git add CHANGELOG.md
git commit -m "docs: regenerate changelog"