chore: simplify Makefile
This commit is contained in:
parent
fc8a3e444a
commit
b2f37c2223
1 changed files with 6 additions and 9 deletions
15
Makefile
15
Makefile
|
@ -1,22 +1,19 @@
|
||||||
.DEFAULT: help
|
.DEFAULT: help
|
||||||
.PHONY: help clean clean-pyc clean-build dist
|
.PHONY: help clean clean-pyc clean-build dist
|
||||||
|
|
||||||
help:
|
help: ## Display this help section
|
||||||
@echo "clean : delete all artifacts"
|
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {printf "\033[36m%-38s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
|
||||||
@echo "clean-pyc : delete python cache artifacts"
|
|
||||||
@echo "clean-build : delete distribution artifacts"
|
|
||||||
@echo "dist : generate distribution artifacts"
|
|
||||||
|
|
||||||
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 '*.pyc' -delete
|
||||||
@find . -name '*.pyo' -delete
|
@find . -name '*.pyo' -delete
|
||||||
@find . -name __pycache__ -delete
|
@find . -name __pycache__ -delete
|
||||||
|
|
||||||
clean-build:
|
clean-build: ## Delete distribution artifacts
|
||||||
@rm --force --recursive build dist src/*.egg-info docs/_build
|
@rm --force --recursive build dist src/*.egg-info docs/_build
|
||||||
|
|
||||||
dist: clean
|
dist: clean ## Generate distribution artifacts
|
||||||
poetry build
|
poetry build
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue