chore(guard): 发布脚本与 pre-push 都接插件两仓一致性检查
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 49s
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 49s
- scripts/release.sh、scripts/publish-update.sh:开头加前置门禁(不一致直接退出,不发包不传 NAS), 末尾加收尾复核(发布过程中若有人手改产物层,这里立刻暴露) - scripts/git-hooks/pre-push + scripts/install-git-hooks.sh + npm run hooks:install: 推送桌面仓前自动比对两仓,不一致拒绝推送;源仓不存在时跳过(CI/别人机器不阻塞) - docs/standards/plugin-source-of-truth.md §4 补「四道关卡」表与钩子安装方法
This commit is contained in:
1 parent
fd9575a96e
commit
43de3b0054
6 files changed
+55
-1
No files matched your search
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# 安装仓库自带的 git hooks(目前只有 pre-push:插件两仓一致性)
|
||||
set -e
|
||||
root=$(cd "$(dirname "$0")/.." && pwd)
|
||||
hooks="$root/.git/hooks"
|
||||
[ -d "$hooks" ] || { echo "找不到 $hooks"; exit 1; }
|
||||
for f in "$root"/scripts/git-hooks/*; do
|
||||
name=$(basename "$f")
|
||||
cp "$f" "$hooks/$name"
|
||||
chmod +x "$hooks/$name"
|
||||
echo "installed .git/hooks/$name"
|
||||
done
|
||||
Reference in new issue
Block a user