chore: simplify Makefile
This commit is contained in:
parent
2e2a0d17a1
commit
4cd091c67a
1 changed files with 12 additions and 19 deletions
29
Makefile
29
Makefile
|
@ -1,40 +1,33 @@
|
|||
.DEFAULT: help
|
||||
.PHONY: help clean clean-pyc clean-build dist lint test tests docs
|
||||
|
||||
help:
|
||||
@echo "clean : delete all artifacts"
|
||||
@echo "clean-pyc : delete python cache artifacts"
|
||||
@echo "clean-build : delete distribution artifacts"
|
||||
@echo "dist : generate distribution artifacts"
|
||||
@echo "lint : lint with black, flake8 & reorder-python-imports"
|
||||
@echo "test : run tests with latest Python version"
|
||||
@echo "coverage : run coverage tests with latest Python version"
|
||||
@echo "tests : run tests with supported Python versions"
|
||||
help: ## Display this help section
|
||||
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {printf "\033[36m%-38s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
|
||||
|
||||
clean: clean-pyc clean-build
|
||||
clean: clean-pyc clean-build ## Delete all artifacts
|
||||
|
||||
clean-pyc:
|
||||
clean-pyc: ## Delete python cache artifacts
|
||||
@find . -name '*.pyc' -delete
|
||||
@find . -name '*.pyo' -delete
|
||||
@find . -name __pycache__ -delete
|
||||
|
||||
clean-build:
|
||||
clean-build: ## Delete distribution artifacts
|
||||
@rm --force --recursive build dist src/*.egg-info docs/_build
|
||||
|
||||
dist: clean
|
||||
dist: clean ## Generate distribution artifacts
|
||||
poetry build
|
||||
|
||||
lint:
|
||||
lint: ## Lint with black, flake8 & reorder-python-imports
|
||||
nox -rs precommit
|
||||
|
||||
test:
|
||||
test: ## Run tests with latest Python version
|
||||
nox
|
||||
|
||||
coverage:
|
||||
coverage: ## Run coverage tests with latest Python version
|
||||
nox -rs coverage
|
||||
|
||||
tests:
|
||||
tests: ## Run tests with all supported Python versions
|
||||
nox -rs tests
|
||||
|
||||
docs:
|
||||
docs: ## Run documentation generation
|
||||
nox -rs docs
|
Loading…
Reference in a new issue