-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
90 lines (70 loc) · 1.67 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
.DEFAULT_GOAL := docs
.PHONY: update
update:
@echo "-------------------------"
@echo "- Updating dependencies -"
@echo "-------------------------"
rm requirements.txt
touch requirements.txt
pip-compile -Ur requirements.in --allow-unsafe
pip install -r requirements.txt
@echo ""
.PHONY: clean
clean:
@echo "---------------------------"
@echo "- Cleaning unwanted files -"
@echo "---------------------------"
rm -rf `find . -name __pycache__`
rm -f `find . -type f -name '*.py[co]' `
rm -f `find . -type f -name '*.rej' `
rm -f `find . -type f -name '*~' `
rm -f `find . -type f -name '.*~' `
rm -rf .cache
rm -rf .pytest_cache
rm -rf .mypy_cache
rm -rf htmlcov
rm -rf *.egg-info
rm -f .coverage
rm -f .coverage.*
rm -rf build
rm -rf dist
rm -f src/*.c pydantic/*.so
rm -rf site
rm -rf docs/_build
rm -rf docs/.changelog.md docs/.version.md docs/.tmp_schema_mappings.html
rm -rf codecov.sh
rm -rf coverage.xml
@echo ""
.PHONY: docs
docs:
@echo "-------------------------"
@echo "- Serving documentation -"
@echo "-------------------------"
mkdocs serve
@echo ""
.PHONY: bump
bump: pull-main bump-version clean
.PHONY: pull-main
pull-main:
@echo "------------------------"
@echo "- Updating repository -"
@echo "------------------------"
git checkout main
git pull
@echo ""
.PHONY: build-docs
build-docs:
@echo "--------------------------"
@echo "- Building documentation -"
@echo "--------------------------"
mkdocs build
@echo ""
.PHONY: bump-version
bump-version:
@echo "---------------------------"
@echo "- Bumping program version -"
@echo "---------------------------"
cz bump --changelog --no-verify
git push
git push --tags
@echo ""