fix: Makefile - setup-git-hooks
This commit is contained in:
parent
188ebf853c
commit
02c6a15607
@ -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$")
|
||||
|
||||
|
||||
2
Makefile
2
Makefile
@ -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..."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user