-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
35 lines (25 loc) · 1.17 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
.PHONY: help
.SILENT:
help: # Show this help message.
@grep -E '^[a-zA-Z_-]+:.*?# .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?# "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
install: # Install requirements of project.
poetry install
cov-test: # Run the tests.
coverage run -m pytest
cov-report: cov-test # Show the coverage of tests.
coverage report -m
freeze: # Export the requirements.txt file.
poetry export --without-hashes -f requirements.txt --output requirements.txt
poetry export --with dev --without-hashes -f requirements.txt --output requirements-dev.txt
poetry export --with test --without-hashes -f requirements.txt --output requirements-test.txt
poetry export --with dev --without-hashes -f constraints.txt --output constraints.txt
lint: # Lint the code.
flake8
type-check: # Check the type.
mypy
format: # Format the code.
black .
update-version: # Sync package file version.
sed -i -E "s/[0-9]+\.[0-9]+\.[0-9]+/$$(poetry version --short)/1" EorzeaEnv/__init__.py
print-changelog: # Print changelog of current version.
@awk -v ver=$$(poetry version --short) '/^#+ \[/ { if (p) { exit }; if ($$2 == "["ver"]") { p=1; next } } p && NF' CHANGELOG.md