-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (42 loc) · 1.28 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
PROJECT_NAME=zpl_image_extractor
.PHONY: clean-pyc
clean-eggs:
@find . -name '*.egg' -print0|xargs -0 rm -rf --
@rm -rf .eggs/
clean-pyc:
@find . -iname '*.py[co]' -delete
@find . -iname '__pycache__' -delete
@find . -iname '.coverage' -delete
@rm -rf htmlcov/
pre-clean: clean-eggs clean-pyc
@find . -iname '*~' -delete
@find . -iname '*.swp' -delete
@find . -iname '__pycache__' -delete
post-clean:
@rm -rf build/
@rm $(PROJECT_NAME).spec
@rm dist/$(PROJECT_NAME)
test:
poetry run pytest -vv tests
test-cov:
poetry run pytest -vv --cov=loafer tests
cov:
poetry run coverage report -m
cov-report:
poetry run pytest -vv --cov=loafer --cov-report=html tests
check-fixtures:
poetry run pytest --dead-fixtures
changelog-preview:
@echo "\nmain ("$$(date '+%Y-%m-%d')")"
@echo "-------------------\n"
@git log $$(poetry version -s)...main --oneline --reverse
version = `cat CHANGES.rst | awk '/^[0-9]+\.[0-9]+(\.[0-9]+)?/' | head -n1`
bump_version:
poetry version $(version)
bump_binary: bump_version pre-clean
pyinstaller --onefile --name $(PROJECT_NAME) $(PROJECT_NAME)/cli.py
@tar -C dist/ -czf dist/$(PROJECT_NAME).$(version).tar.gz $(PROJECT_NAME)
@make post-clean
release: bump_binary
git tag -a v$(version) -m "Creation of v$(version)"
git push origin v$(version)