05203a9b5b
Design Source Checks / design-source (push) Failing after 14m23s
- git mv 全目录(历史保留);.gitignore 收敛为整个 .superpowers/ 忽略 - 全仓 16 处引用同步(CI checks.yml / l1-sync / screens.mjs / hooks / CLAUDE.md / CONTRACT / SSR 模板注释 / docs / web 注释) - 修 pre-commit 路径正则残留;5180 评审服务已切新路径 - 验证:check-ds 12 道 / l1-sync 6 道 / fidelity 抽查全过 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJ1g8XV1YhhmHRzhwWEW7o
23 lines
834 B
Bash
Executable File
23 lines
834 B
Bash
Executable File
#!/bin/sh
|
|
# 安装本地 git 钩子(每台机器跑一次)。把 git 的 pre-commit 接到仓库内
|
|
# scripts/hooks/pre-commit(设计系统守门闸)。钩子是本地的,不随 git 同步——
|
|
# 故需各机器各跑一次本脚本。
|
|
set -e
|
|
|
|
hooks_dir="$(git rev-parse --git-path hooks)"
|
|
mkdir -p "$hooks_dir"
|
|
target="$hooks_dir/pre-commit"
|
|
|
|
cat > "$target" <<'SH'
|
|
#!/bin/sh
|
|
# 委托到仓库内 scripts/hooks/pre-commit(随当前 worktree 的 checkout 走;
|
|
# 不存在则放行,便于尚未合入该脚本的分支/worktree)。
|
|
hook="$(git rev-parse --show-toplevel)/scripts/hooks/pre-commit"
|
|
[ -x "$hook" ] && exec "$hook"
|
|
exit 0
|
|
SH
|
|
chmod +x "$target"
|
|
|
|
echo "[ds-gate] ✓ 已安装 pre-commit 钩子 → $target"
|
|
echo "[ds-gate] 今后提交若动了 design/prototype/ 会自动跑 12 道设计系统闸。"
|