-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-hooks.sh
More file actions
executable file
·30 lines (24 loc) · 890 Bytes
/
install-hooks.sh
File metadata and controls
executable file
·30 lines (24 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
# Install repository-managed git hooks for ai-coding-kit.
#
# Registers the root .githooks/ directory with this clone:
# - pre-commit: SKILL evolution-proposal guard for skills-engineering/ios-engineer/
# - pre-push: skill-sync chain + mcp-sync (sync_all.sh)
#
# Run this once per clone:
# bash install-hooks.sh
set -euo pipefail
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$REPO_ROOT"
if [ ! -d .githooks ]; then
echo "install-hooks: .githooks directory not found at $REPO_ROOT" >&2
exit 1
fi
chmod +x .githooks/* 2>/dev/null || true
git config core.hooksPath .githooks
echo "core.hooksPath: $(git config --get core.hooksPath)"
echo "Hooks installed:"
ls -la .githooks/ | tail -n +2 | awk '{print " " $0}'
echo ""
echo "Bypass single push: git push --no-verify"
echo "Bypass skill checks: SKILL_BYPASS=1 git commit / git push"