- dacli/ 整目录被 .gitignore 忽略,本次 force-add 其业务源码(766 文件) - 排除 node_modules/.env(含 PGPASSWORD 等敏感信息)/.DS_Store/__pycache__/*.pyc - 新增 dacli/.gitignore 长期管理内部噪声,新增文件仍需 git add -f - 根 .gitignore 补充 .cache/ 与诊断脚本忽略,并加 dacli 段说明
11 lines
436 B
Bash
Executable File
11 lines
436 B
Bash
Executable File
#!/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 应被阻塞"
|