From 7dc9955a837936718e37cb70f787a28dbae61c79 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Fri, 25 Jul 2025 16:46:52 +1000 Subject: [PATCH] Create Makefile for more automation and convenience We can expand on this in future perhaps installing the pre-commit package and / or adding more targets --- Makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Makefile 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}'