Snapshot all RDM pins in the e2e build #718
+6
-3
@@ -60,8 +60,9 @@ done
|
||||
|
||||
# ── 1. 构建 ─────────────────────────────────────────────
|
||||
# RDM 源码经 git archive 从本地对象导出(不建 worktree、不触远端——Gitea 抖动时
|
||||
# submodule 克隆会挂死);pins/* 从 RDM 主检出的已物化 submodule 快照拷贝(cp 排除
|
||||
# .git,39MB 级),构建输入由此固定为 RDM origin/main + 其 gitlink 指向的本地内容。
|
||||
# submodule 克隆会挂死);pins/* 从 RDM 主检出的已物化 submodule 快照拷贝(tar 排除
|
||||
# .git;含 go.mod replace 引用的全部 pin,不仅 backend),构建输入由此固定为
|
||||
# RDM origin/main + 其 gitlink 指向的本地内容。
|
||||
log "build RDM binary (archive origin/main + snapshot pins from local checkout)"
|
||||
RDM_WT="$OUT/rdm-src"
|
||||
RDM_SHA=$(git -C "$RDM_REPO" rev-parse origin/main) || die "no origin/main in RDM repo"
|
||||
@@ -75,7 +76,9 @@ PIN_SHA_WANT=$(git -C "$RDM_REPO" ls-tree "$RDM_SHA" pins/agent-system-backend |
|
||||
[ "$PIN_SHA_MAIN" = "$PIN_SHA_WANT" ] \
|
||||
|| die "RDM checkout pins/backend ($PIN_SHA_MAIN) != origin/main pin ($PIN_SHA_WANT); git -C $RDM_REPO submodule update first"
|
||||
mkdir -p "$RDM_WT/pins"
|
||||
tar -C "$RDM_REPO/pins" --exclude=.git -cf - agent-system-backend | tar -C "$RDM_WT/pins" -xf -
|
||||
# 快照全部 pins/*(go.mod replace 依赖 agent-document-renderer、agent-squad 等,
|
||||
# 仅拷贝 backend 会导致 RDM 构建缺 pin);--exclude=.git 保持不变。
|
||||
tar -C "$RDM_REPO/pins" --exclude=.git -cf - . | tar -C "$RDM_WT/pins" -xf -
|
||||
cleanup() {
|
||||
[ -n "${API_PID:-}" ] && { kill "$API_PID" 2>/dev/null || true; wait "$API_PID" 2>/dev/null || true; }
|
||||
# Preview runs directly as one owned Vite process. Verify its command before
|
||||
|
||||
Reference in New Issue
Block a user