chore(guard): 发布脚本与 pre-push 都接插件两仓一致性检查
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:
qiqi committed 2026-11-29 12:35:33 +08:00
1 parent fd9575a96e
commit 43de3b0054
6 files changed
+55 -1

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
# pre-push:推送前校验桌面仓 plugins/ 与插件源仓一致(v3.26.109)
# 由 scripts/install-git-hooks.sh 安装;源仓不存在时 check 脚本会自行跳过。
root=$(git rev-parse --show-toplevel)
if ! node "$root/scripts/check-plugins-sync.js"; then
echo ''
echo '[pre-push] 插件两仓不一致,已阻止推送。'
echo '[pre-push] 正确做法:在 iwb-plugins-desktop 改源码 → 桌面仓 node scripts/sync-plugins-from-repo.js'
echo '[pre-push] 说明:docs/standards/plugin-source-of-truth.md'
exit 1
fi
exit 0