fix: Makefile - setup-git-hooks
Some checks failed
CI Pipeline / Lint (push) Failing after 5m26s
CI Pipeline / Test (push) Has been skipped
CI Pipeline / Security Scan (push) Successful in 7m7s
CI Pipeline / Build (push) Has been skipped
CI Pipeline / Notification (push) Successful in 1s

This commit is contained in:
ulflow_phattt2901 2025-06-06 12:50:35 +07:00
parent 188ebf853c
commit 02c6a15607
2 changed files with 4 additions and 3 deletions

View File

@ -3,7 +3,10 @@
# This hook runs linters and checks before allowing a commit
echo "Running pre-commit checks..."
echo "Current working directory: $(pwd)"
echo "Which golangci-lint: $(which golangci-lint)"
echo "golangci-lint version: $(golangci-lint version)"
cd "$PROJECT_ROOT" || exit 1 # Exit if cd fails
# Check for staged Go files
STAGED_GO_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep "\.go$")

View File

@ -133,9 +133,7 @@ setup-git-hooks:
@echo Copying prepare-commit-msg hook...
@copy /Y .gitea\hooks\prepare-commit-msg .git\hooks\prepare-commit-msg >nul || (echo Warning: Could not copy prepare-commit-msg hook & exit /b 1)
git config --local core.hooksPath .git/hooks
@echo "Git setup complete!"
# Create git message template
setup-git-message:
@echo "Creating Git commit message template..."