-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (36 loc) · 1.03 KB
/
Copy pathMakefile
File metadata and controls
47 lines (36 loc) · 1.03 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
TWINE_REPOSITORY ?= pypi
.PHONY: all
all: install
.PHONY: test
test: pre-commit pytest
.venv/bin/pip:
python3 -m venv .venv
.PHONY: install
install: .venv/bin/pip
./.venv/bin/pip install -IU pip
./.venv/bin/pip install -IU .[development,test]
./.venv/bin/pip install -e .
requirements := $(wildcard requirements-dev.txt requirements.d/*.txt)
.venv/bin/pre-commit: $(requirements)
make install
.venv/bin/pytest: $(requirements)
make install
.PHONY: pre-commit
pre-commit: .venv/bin/pre-commit
./.venv/bin/pre-commit install
./.venv/bin/pre-commit run --all
.PHONY: pytest
pytest: .venv/bin/pytest
./.venv/bin/pytest
.PHONY: htmlreport
htmlreport: .venv/bin/pytest
./.venv/bin/pytest --cov-report html
.PHONY: release
release:
@echo "Releasing to repository: $(TWINE_REPOSITORY)"
@echo "To release to a different repository, run \`make release TWINE_REPOSITORY=<repository>\`"
TWINE_REPOSITORY="$(TWINE_REPOSITORY)" uvx \
--from zest-releaser \
--with zest-releaser\[recommended\] \
--with zestreleaser-towncrier \
fullrelease