From f773e4a30236d9d5882af199a9f182456b7e5425 Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Tue, 2 Jan 2024 04:18:03 +0000 Subject: [PATCH] feat: Updated scripts/githooks/commit-msg --- scripts/githooks/commit-msg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/githooks/commit-msg b/scripts/githooks/commit-msg index bc76a56..ae48a27 100644 --- a/scripts/githooks/commit-msg +++ b/scripts/githooks/commit-msg @@ -12,7 +12,7 @@ # enforce checking for proper commit message format before actual commits. # You may need to make the script executable by 'chmod +x .git/hooks/commit-msg'. -# commit-msg use go-gitlint tool, install go-gitlint via `go get github.com/llorllale/go-gitlint/cmd/go-gitlint` +# commit-msg use go-gitlint tool, install go-gitlint via `go get -u github.com/llorllale/go-gitlint/cmd/go-gitlint` # go-gitlint --msg-file="$1" # An example hook script to check the commit log message. @@ -53,7 +53,8 @@ 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 + go get -u github.com/llorllale/go-gitlint +cp $(go env GOPATH)/bin/go-gitlint ./_output/tools/go-gitlint 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