-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
34 lines (24 loc) · 836 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
.PHONY: tests docs build
VERSION := $(shell git for-each-ref refs/tags --format='%(refname:short)' | grep -E "^v[0-9]+\..*" | tail -n1)
install:
pip install -U pip poetry -q
poetry install --with=dev,test --all-extras
poetry run pre-commit install
poetry run pre-commit autoupdate
precommit:
poetry run pre-commit run --all-files
test:
poetry run pytest
serve:
rm -rf docs/generated/gallery;
poetry run mkdocs serve --clean
docs:
poetry run poetry version $(VERSION) && poetry run mkdocs build
pushdocs:
poetry run poetry version $(VERSION) && poetry run mkdocs gh-deploy --force
build:
rm -rf dist; poetry version $(VERSION) && poetry publish --build --dry-run
publish:
rm -rf dist; poetry config pypi-token.pypi $$PYPI_TOKEN && poetry version $(VERSION) && poetry publish --build
tests: test
all: precommit tests