GRM-23: fix: improve make setup with version guard, pre-push hooks and commit-msg validator
CI / lint (push) Has been cancelled
CI / unit-tests (push) Has been cancelled
CI / molecule-tests (push) Has been cancelled

This commit is contained in:
Emil Simeonov
2026-06-19 13:18:17 +02:00
parent d4766da5f9
commit 1a917e7a5d
2 changed files with 18 additions and 1 deletions
+11 -1
View File
@@ -12,7 +12,16 @@ setup: $(VENV)/bin/activate .env activate-scripts checkmake
$(BIN)/ansible-galaxy collection install -r ansible/requirements.yml
$(BIN)/pre-commit install
$(BIN)/pre-commit install --hook-type commit-msg
@echo "Setup complete. Activate the virtual environment with: source .venv/bin/activate"
$(BIN)/pre-commit install --hook-type pre-push
@echo ""
@echo "Setup complete."
@echo "Activate the virtual environment with one of:"
@echo " source .venv/bin/activate (generic)"
@echo " source activate.sh (bash)"
@echo " source activate.fish (fish)"
@echo " source activate.zsh (zsh)"
@-$(BIN)/grm --version
@-$(BIN)/pre-commit --version
.env:
@if [ ! -f .env ]; then \
@@ -21,6 +30,7 @@ setup: $(VENV)/bin/activate .env activate-scripts checkmake
fi
$(VENV)/bin/activate:
@python3 -c "import sys; v=sys.version_info; assert v >= (3, 11), f'Python 3.11+ required, found {v.major}.{v.minor}'; print(f'Python {v.major}.{v.minor}.{v.micro} OK')"
$(PYTHON) -m venv $(VENV)
$(BIN)/pip install --upgrade pip setuptools wheel