summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXenGi <email@ricardo.band>2023-03-23 12:13:35 +0000
committerXenGi <email@ricardo.band>2023-03-23 12:13:35 +0000
commit1c9dcc1a9f79ed8c2855f937856b5f298fe90884 (patch)
tree903529f0d731fc747d0ab3a1ae9e4ab2a2af31f7
parentba5bf672352415973a52ca9c4d3842308513136a (diff)
downloadgerbonara-1c9dcc1a9f79ed8c2855f937856b5f298fe90884.tar.gz
gerbonara-1c9dcc1a9f79ed8c2855f937856b5f298fe90884.tar.bz2
gerbonara-1c9dcc1a9f79ed8c2855f937856b5f298fe90884.zip
Update Makefile
-rw-r--r--Makefile34
1 files changed, 17 insertions, 17 deletions
diff --git a/Makefile b/Makefile
index c7a70a1..228dc27 100644
--- a/Makefile
+++ b/Makefile
@@ -1,45 +1,45 @@
+PYTHON ?= python
+PYTEST ?= pytest
+SPHINX_BUILD ?= sphinx-build
-PYTHON ?= python
-PYTEST ?= pytest
-SPHINX_BUILD ?= sphinx-build
+.DEFAULT_GOAL := help
+
+.PHONY: clean docs test test-coverage install sdist bdist_wheel upload testupload help
all: docs sdist bdist_wheel
-.PHONY: clean
-clean:
+clean: ## Clean up project directory
find . -name '*.pyc' -delete
rm -rf *.egg-info
rm -f .coverage
rm -f coverage.xml
rm -rf docs/_build
-.PHONY: docs
-docs:
+docs: ## Generate documentation
sphinx-build -E docs docs/_build
-.PHONY: test
-test:
+test: ## Run tests
$(PYTEST)
-.PHONY: test-coverage
-test-coverage:
+test-coverage: ## Generate coverage
rm -f .coverage
rm -f coverage.xml
$(PYTEST) --cov=./ --cov-report=xml
-.PHONY: install
-install:
+install: ## Install locally
PYTHONPATH=. $(PYTHON) setup.py install
-sdist:
+sdist: ## Build source distribution
python3 setup.py sdist
-bdist_wheel:
+bdist_wheel: ## Build binary distribution
python3 setup.py bdist_wheel
-upload: sdist bdist_wheel
+upload: sdist bdist_wheel ## Upload Python package to PyPI
twine upload -s -i gerbonara@jaseg.de --config-file ~/.pypirc --skip-existing --repository pypi dist/*
-testupload: sdist bdist_wheel
+testupload: sdist bdist_wheel ## Upload Python package to test PyPI
twine upload --config-file ~/.pypirc --skip-existing --repository testpypi dist/*
+help: ## Display this help
+ @grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'