mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 19:38:28 +00:00
Update: ignore dist/control-ui in dirty check (#1976)
Co-authored-by: Glucksberg <glucksberg@users.noreply.github.com>
This commit is contained in:
@@ -346,10 +346,14 @@ export async function runGatewayUpdate(opts: UpdateRunnerOptions = {}): Promise<
|
||||
const channel: UpdateChannel = opts.channel ?? "dev";
|
||||
const branch = channel === "dev" ? await readBranchName(runCommand, gitRoot, timeoutMs) : null;
|
||||
const needsCheckoutMain = channel === "dev" && branch !== DEV_BRANCH;
|
||||
gitTotalSteps = channel === "dev" ? (needsCheckoutMain ? 10 : 9) : 8;
|
||||
gitTotalSteps = channel === "dev" ? (needsCheckoutMain ? 11 : 10) : 9;
|
||||
|
||||
const statusCheck = await runStep(
|
||||
step("clean check", ["git", "-C", gitRoot, "status", "--porcelain"], gitRoot),
|
||||
step(
|
||||
"clean check",
|
||||
["git", "-C", gitRoot, "status", "--porcelain", "--", ":!dist/control-ui/"],
|
||||
gitRoot,
|
||||
),
|
||||
);
|
||||
steps.push(statusCheck);
|
||||
const hasUncommittedChanges =
|
||||
@@ -654,6 +658,17 @@ export async function runGatewayUpdate(opts: UpdateRunnerOptions = {}): Promise<
|
||||
);
|
||||
steps.push(uiBuildStep);
|
||||
|
||||
// Restore dist/control-ui/ to committed state to prevent dirty repo after update
|
||||
// (ui:build regenerates assets with new hashes, which would block future updates)
|
||||
const restoreUiStep = await runStep(
|
||||
step(
|
||||
"restore control-ui",
|
||||
["git", "-C", gitRoot, "checkout", "--", "dist/control-ui/"],
|
||||
gitRoot,
|
||||
),
|
||||
);
|
||||
steps.push(restoreUiStep);
|
||||
|
||||
const doctorStep = await runStep(
|
||||
step(
|
||||
"clawdbot doctor",
|
||||
|
||||
Reference in New Issue
Block a user