This repository has been archived on 2026-08-11. You can view files and clone it, but cannot push or open issues or pull requests.
Gishen-Admin/scripts/setup-githooks.sh
kirukib 40771434d1 Add cross-app Gishen master spec and pre-push refresh tooling.
Establish the shared Admin/Mob/Ecom/B2B contract in-repo and wire Cursor rules, reminder scripts, and a soft pre-push hook so pushes keep the master (and Admin sheet pointers) current.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 16:27:01 +03:00

15 lines
566 B
Bash
Executable File

#!/usr/bin/env bash
# Enable in-repo hooks for this clone only (does not touch global git config).
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
git config core.hooksPath .githooks
chmod +x .githooks/pre-push scripts/sync-master-spec-reminder.sh scripts/setup-githooks.sh 2>/dev/null || true
echo "Set local core.hooksPath=.githooks for $(basename "$ROOT")"
echo "Pre-push will remind you to refresh docs/GISHEN-MASTER-SPEC.md"
echo "Unset with: git config --unset core.hooksPath"
echo "Strict block: GISHEN_MASTER_SPEC_STRICT=1 git push"