ai-project-manage-cli 8.0.9 → 8.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/webide-message-worker.js +10 -16
- package/package.json +1 -1
|
@@ -983,24 +983,18 @@ async function checkoutBaselineBranch(baselineBranch, options = {}) {
|
|
|
983
983
|
const gitRoot = await resolveGitRepoRoot(cwd);
|
|
984
984
|
await ensureGitRepo(gitRoot);
|
|
985
985
|
if (await isWorkingTreeDirty(gitRoot)) {
|
|
986
|
-
throw new Error(
|
|
987
|
-
`[apm] \u5DE5\u4F5C\u533A\u6709\u672A\u63D0\u4EA4\u53D8\u66F4\uFF0C\u65E0\u6CD5\u5207\u6362\u5230\u57FA\u7EBF\u5206\u652F ${baseline}`
|
|
988
|
-
);
|
|
986
|
+
throw new Error(`[apm] \u5DE5\u4F5C\u533A\u6709\u672A\u63D0\u4EA4\u53D8\u66F4\uFF0C\u65E0\u6CD5\u5207\u6362\u5230\u57FA\u7EBF\u5206\u652F ${baseline}`);
|
|
989
987
|
}
|
|
990
988
|
await ensureRemoteBaselineBranch(gitRoot, baseline);
|
|
991
989
|
const current = await getCurrentBranch(gitRoot);
|
|
992
|
-
if (current
|
|
993
|
-
await execGit(gitRoot, ["
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
baseline,
|
|
1001
|
-
`origin/${baseline}`
|
|
1002
|
-
]);
|
|
1003
|
-
console.log(`[apm] \u5DF2\u5207\u6362\u5230\u57FA\u7EBF\u5206\u652F ${baseline}`);
|
|
990
|
+
if (current !== baseline) {
|
|
991
|
+
await execGit(gitRoot, ["checkout", "-B", baseline, `origin/${baseline}`]);
|
|
992
|
+
}
|
|
993
|
+
await execGit(gitRoot, ["reset", "--hard", `origin/${baseline}`]);
|
|
994
|
+
const head = (await execGit(gitRoot, ["rev-parse", "--short", "HEAD"], true)).trim();
|
|
995
|
+
console.log(
|
|
996
|
+
`[apm] \u5DF2\u5207\u6362\u5230\u57FA\u7EBF ${baseline}\uFF0C\u5E76\u5BF9\u9F50 origin/${baseline}\uFF08${head}\uFF09`
|
|
997
|
+
);
|
|
1004
998
|
return baseline;
|
|
1005
999
|
}
|
|
1006
1000
|
|
|
@@ -4103,7 +4097,7 @@ async function handleWebIdePackage(cfg, msg, signal) {
|
|
|
4103
4097
|
);
|
|
4104
4098
|
if (signal.aborted) throw new Error("\u4EFB\u52A1\u5DF2\u53D6\u6D88");
|
|
4105
4099
|
await runPrepStep(
|
|
4106
|
-
"\u5207\u6362\u57FA\u7EBF\
|
|
4100
|
+
"\u5207\u6362\u57FA\u7EBF\u5E76\u62C9\u53D6\u6700\u65B0",
|
|
4107
4101
|
async () => checkoutBaselineBranches(msg.baseBranch, { cwd: workdir }),
|
|
4108
4102
|
(result) => `baseline=${result.baseline} kind=${result.kind} repos=${result.repos.length}`
|
|
4109
4103
|
);
|