-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
47 lines (37 loc) · 1.09 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
.PHONY: hooks
hooks:
# Ensure the hook is installed and executed before pushing to a remote.
test -f .git/hooks/pre-commit || pre-commit install --hook-type pre-commit -f
pre-commit run --all-files
.PHONY: run
run:
poetry export --dev -f requirements.txt | poetry run skjold --verbose audit --report-format=json -
.PHONY: tests
tests:
PYTHONPATH=src pytest -x --cov=src tests
.PHONY: watch
watch:
PYTHONPATH=src ptw -q -c
.PHONY: audit
audit:
poetry export --dev -f requirements.txt | poetry run skjold audit -
.PHONY: report-cli
report-cli:
poetry export --dev -f requirements.txt | poetry run skjold --verbose audit -
.PHONY: report-json
report-json:
poetry export --dev -f requirements.txt | poetry run skjold --verbose audit --report-format=json --report-only - | jq '.[]'
.PHONY: build
build: clean audit tests hooks
poetry build
.PHONY: prerelease
prerelease: build
poetry publish -r testpypi
.PHONY: release
release: build
poetry publish -r pypi
.PHONY: clean
clean:
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
rm -rf .skjold_cache/
rm -rf ~/.skjold