From d6f23e62e984cd2618da280463ba3bbdf3abe692 Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Sat, 30 Dec 2023 07:11:39 +0000 Subject: [PATCH] feat: Updated scripts/githooks/commit-msg --- scripts/githooks/commit-msg | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/githooks/commit-msg b/scripts/githooks/commit-msg index e91555c..4de3928 100644 --- a/scripts/githooks/commit-msg +++ b/scripts/githooks/commit-msg @@ -51,6 +51,15 @@ test "" = "$(grep '^Signed-off-by: ' "$1" | # TODO: go-gitlint dir set GITLINT_DIR="./_output/tools/go-gitlint" +if ! command -v $GITLINT_DIR &>/dev/null; then + echo "$GITLINT_DIR not found. Attempting to install it..." + # Add the commands to download and install the go-gitlint tool here + if [ $? -ne 0 ]; then + printError "Failed to install $GITLINT_DIR. Please run 'make tools' OR 'make tools.verify.go-gitlint' make verto install it manually." + exit 1 + fi +fi + $GITLINT_DIR \ --msg-file=$1 \ --subject-regex="^(build|chore|ci|docs|feat|feature|fix|perf|refactor|revert|style|test)(.*)?:\s?.*" \