Skip to content

Commit

Permalink
feat: Updated scripts/githooks/commit-msg
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Jan 1, 2024
1 parent 6ff25a0 commit 80b7842
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion scripts/githooks/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ 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
wget -q -O go-gitlint https://example.com/go-gitlint && chmod +x go-gitlint
mv go-gitlint $GITLINT_DIR
INSTALL_STATUS=$?
if [ $INSTALL_STATUS -ne 0 ]; then
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
Expand All @@ -73,6 +76,13 @@ then
if ! command -v $GITLINT_DIR &>/dev/null; then
printError "$GITLINT_DIR not found. Installing the go-gitlint tool..."
make tools
$GITLINT_DIR --version
if [ $? -eq 0 ]; then
printSuccess "go-gitlint tool has been installed correctly."
else
printError "Failed to run go-gitlint tool. Please check the installation."
exit 1
fi
printError "Please make sure the installation was successful and re-run the commit-msg hook."
fi
printError "Please fix your commit message to match kubecub coding standards"
Expand Down

0 comments on commit 80b7842

Please sign in to comment.