Spaces:
Sleeping
Sleeping
File size: 451 Bytes
0d8c22c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #!/usr/bin/env bash
# Install the G.U.I.D.E. git hooks (SPEC.md §4). Idempotent — run anytime.
set -euo pipefail
ROOT="$(git rev-parse --show-toplevel)"
SRC="$ROOT/scripts/hooks/pre-commit"
DST="$ROOT/.git/hooks/pre-commit"
if [ ! -f "$SRC" ]; then
echo "❌ $SRC not found." >&2
exit 1
fi
cp "$SRC" "$DST"
chmod +x "$DST"
echo "✅ Installed pre-commit hook → $DST"
echo " It runs tests/test_sanity.py and blocks commits if they fail."
|