Adds .githooks/pre-commit (secret scan, large-file guard, fast tests), scripts/check-secrets.sh, scripts/agent-commit.sh, scripts/publish.sh and scripts/setup-hooks.sh so every work session leaves a verifiable commit.
15 lines
393 B
Bash
Executable file
15 lines
393 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Enable the committed git hooks and make the scripts executable.
|
|
#
|
|
# Run once after cloning: scripts/setup-hooks.sh
|
|
|
|
set -euo pipefail
|
|
|
|
root="$(git rev-parse --show-toplevel)"
|
|
cd "$root"
|
|
|
|
chmod +x scripts/*.sh .githooks/* 2>/dev/null || true
|
|
git config core.hooksPath .githooks
|
|
|
|
echo "core.hooksPath -> .githooks"
|
|
echo "hooks enabled: $(git config --get core.hooksPath)"
|