-
Notifications
You must be signed in to change notification settings - Fork 93
/
Makefile
90 lines (71 loc) · 1.91 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: install
install:
pdm install
.PHONY: update
update:
@echo "-------------------------"
@echo "- Updating dependencies -"
@echo "-------------------------"
pdm update --no-sync
pdm sync --clean
@echo "\a"
.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 -rf `find . -type d -name '*.egg-info' `
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 -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 "-------------------------"
pdm run mkdocs serve --strict
@echo ""
.PHONY: format
format:
@echo "----------------------"
@echo "- Running formatters -"
@echo "----------------------"
@bash .scripts/footer.sh
@echo ""
.PHONY: build-docs
build-docs:
@echo "--------------------------"
@echo "- Building documentation -"
@echo "--------------------------"
# I need to disable --strict this until we fix all the errors shown (too much work)
# 2024-10-29 issues are fixed but I'd rather not stop the future newsletters for this
# So I think I should not enable the --strict.
pdm run mkdocs build
@echo "\a"
# We can't build --strict because the newsletters are not yet added to the git index,
# and the --strict fails.
.PHONY: build-newsletters
build-newsletters:
@echo "--------------------------"
@echo "- Building newsletters -"
@echo "--------------------------"
pdm run mkdocs build
@echo ""