Files
qiqi 43de3b0054
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 49s
chore(guard): 发布脚本与 pre-push 都接插件两仓一致性检查
- 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 补「四道关卡」表与钩子安装方法
2026-11-29 12:35:33 +08:00

13 lines
564 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/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