-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (45 loc) · 1.11 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# twod makefile
PACKAGE= twod
ROOT=.
EPHEMERAL= .coverage .pytest_cache htmlcov dist twod.egg-info
.PHONY: major_release minor_release patch_release \
MAJOR MINOR PATCH update push publish test cov report
all:
@echo Help:
@echo " make major_release"
@echo " make minor_release"
@echo " make patch_release"
@echo " make build"
@echo " make publish"
@echo " make test"
@echo " make cov"
@echo " make report - dumps HTML coverage report"
@echo " make clean"
major_release: test MAJOR update push publish
minor_release: test MINOR update push publish
patch_release: test PATCH update push publish
MAJOR:
@poetry version major
MINOR:
@poetry version minor
PATCH:
@poetry version patch
update:
@git add pyproject.toml
@git commit -m `poetry version -s`
@git tag `poetry version -s`
push:
@git push --tags origin master
publish:
@poetry build
@poetry publish
test:
@pytest
cov:
pytest --cov=$(ROOT)/$(PACKAGE)
report:
pytest --cov=$(ROOT)/$(PACKAGE) --cov-report=html
clean:
-@find . -name \*,cover -exec rm '{}' \;
-@find . -name \*~ -exec rm '{}' \;
-@/bin/rm -rf $(EPHEMERAL)