1
0
mirror of https://github.com/enpaul/kodak.git synced 2024-11-14 10:36:55 +00:00

Update makefile with better option expansion and new publish target

This commit is contained in:
Ethan Paul 2020-12-21 22:06:02 -05:00
parent 179771adc0
commit efd328ad5f
No known key found for this signature in database
GPG Key ID: C5F5542B54A4D9C6

View File

@ -11,25 +11,22 @@ help: ## List Makefile targets
$(info Makefile documentation) $(info Makefile documentation)
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-10s\033[0m %s\n", $$1, $$2}' @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-10s\033[0m %s\n", $$1, $$2}'
tox: clean
tox
clean-tox: clean-tox:
rm -rf ./.mypy_cache rm --recursive --force ./.mypy_cache
rm -rf ./.tox rm --recursive --force ./.tox
rm -f .coverage rm --force .coverage
find ./tests -type d -name __pycache__ -prune -exec rm -rf {} \; find ./tests -type d -name __pycache__ -prune -exec rm --recursive --force {} \;
clean-py: clean-py:
rm -rf ./dist rm --recursive --force ./dist
rm -rf ./build rm --recursive --force ./build
rm -rf ./*.egg-info rm --recursive --force ./*.egg-info
find ./$(PROJECT) -type d -name __pycache__ -prune -exec rm -rf {} \; find ./$(PROJECT) -type d -name __pycache__ -prune -exec rm --recursive --force {} \;
clean-docs: clean-docs:
rm -rf docs/_build rm --recursive --force docs/_build
rm -f docs/$(PROJECT)*.rst rm --force docs/$(PROJECT)*.rst
rm -f docs/modules.rst rm --force docs/modules.rst
clean: clean-tox clean-py clean-docs; ## Clean temp build/cache files and directories clean: clean-tox clean-py clean-docs; ## Clean temp build/cache files and directories
@ -39,8 +36,11 @@ wheel: ## Build Python binary distribution wheel package
source: ## Build Python source distribution package source: ## Build Python source distribution package
poetry build --format sdist poetry build --format sdist
test: ## Run the project testsuite(s) test: clean-tox ## Run the project testsuite(s)
poetry run tox -r tox
docs: ## Build the documentation using Sphinx publish: clean test wheel source ## Build and upload to pypi (requires $PYPI_API_KEY be set)
poetry run tox -e docs @poetry publish --username __token__ --password $(PYPI_API_KEY)
docs: clean-docs ## Build the documentation using Sphinx
tox -e docs