-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (22 loc) · 968 Bytes
/
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
.PHONY: help init build test lint pretty precommit_install bump_major bump_minor bump_patch
CODE = "asnakedeck"
help: # Make help to show possible targets
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
test: ## Test the project
poetry run coverage run -m pytest --verbosity=2 --log-level=DEBUG $(args)
build: ## Build the sdist/wheel packages
poetry build
lint: ## Check code for style
pre-commit run
poetry run pytest --dead-fixtures --dup-fixtures
pretty: ## Prettify the code
poetry run isort --apply --recursive $(CODE) tests
poetry run black $(CODE) tests
precommit_install: ## Install simple pre-commit checks
pre-commit install
bump_major: ## Release a new major version
poetry run bumpversion major
bump_minor: ## Release a new minor version
poetry run bumpversion minor
bump_patch: ## Release a new patch version
poetry run bumpversion patch