From 1afe8121b8a1457db48ac2808fc88bf76ebde718 Mon Sep 17 00:00:00 2001 From: Carlo Costino Date: Mon, 14 Apr 2025 15:47:12 -0400 Subject: [PATCH] Update Makefile to handle pre-existing git hooks This changeset adds a bit of extra support to the bootstrap command to make sure that pre-existing git hooks do not interfere with the installation of the pre-commit git hooks. Signed-off-by: Carlo Costino --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 8fa5364a0..d1ac2d2d0 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ APP_VERSION_FILE = app/version.py GIT_BRANCH ?= $(shell git symbolic-ref --short HEAD 2> /dev/null || echo "detached") GIT_COMMIT ?= $(shell git rev-parse HEAD 2> /dev/null || echo "") +GIT_HOOKS_PATH ?= $(shell git config --global core.hooksPath || echo "") VIRTUALENV_ROOT := $(shell [ -z $$VIRTUAL_ENV ] && echo $$(pwd)/venv || echo $$VIRTUAL_ENV) @@ -19,7 +20,9 @@ bootstrap: generate-version-file ## Set up everything to run the app poetry lock --no-update poetry install --sync --no-root poetry run playwright install --with-deps + git config --global --unset-all core.hooksPath poetry run pre-commit install + git config --global core.hookspath "${GIT_HOOKS_PATH}" source $(NVMSH) --no-use && nvm install && npm install source $(NVMSH) && npm ci --no-audit source $(NVMSH) && npm run build