diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..474062e --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +PYTHON ?= python3 +PIP := $(PYTHON) -m pip + +.PHONY: install i check c checkinstall ci checkupdate cu help +.DEFAULT_GOAL := help + +install i: ## Install Python dependencies from requirements.txt + $(PIP) install -r requirements.txt + +check c: ## Run pre-commit checks on all files + pre-commit run --all-files + +checkinstall ci: ## Install pre-commit hooks + pre-commit install + +checkupdate cu: ## Update pre-commit hooks to the latest version + pre-commit autoupdate + +help: ## Display this help message + @echo "Usage: make " + @echo + @echo "Available targets:" + @grep -E '^[a-z]+ [a-z]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'