Skip to content

Commit

Permalink
🔄 synced file(s) with kubecub/go-project-layout
Browse files Browse the repository at this point in the history
🤖 kubbot to synchronize the warehouse
  • Loading branch information
kubbot committed Mar 22, 2024
1 parent 04f9ab3 commit 05c1bf5
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions scripts/githooks/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,6 @@ 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?.*" \
Expand All @@ -71,9 +62,7 @@ $GITLINT_DIR \
if [ $? -ne 0 ]
then
if ! command -v $GITLINT_DIR &>/dev/null; then
printError "$GITLINT_DIR not found. Installing the go-gitlint tool..."
make tools
printError "Please make sure the installation was successful and re-run the commit-msg hook."
printError "$GITLINT_DIR not found. Please run 'make tools' OR 'make tools.verify.go-gitlint' make verto install it."
fi
printError "Please fix your commit message to match kubecub coding standards"
printError "https://gist.github.com/cubxxw/126b72104ac0b0ca484c9db09c3e5694#file-githook-md"
Expand Down

0 comments on commit 05c1bf5

Please sign in to comment.