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 补「四道关卡」表与钩子安装方法
13 lines
379 B
Bash
Executable File
13 lines
379 B
Bash
Executable File
#!/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
|