#!/bin/sh # 激活 dacli 版本受控 git hooks (P3, 2026-07-24) # 用法: sh scripts/install-hooks.sh set -e ROOT="$(git rev-parse --show-toplevel)" cd "$ROOT" chmod +x scripts/githooks/* scripts/quality-gate.sh 2>/dev/null || true git config core.hooksPath scripts/githooks echo "✅ core.hooksPath = scripts/githooks (真质量门已激活: tsc+vitest+smoke)" echo " 验证: 故意加一个类型错误后 git commit 应被阻塞"