Merge 7542ab25ee into da71eaebd2
This commit is contained in:
commit
25ab3438fd
@ -678,14 +678,23 @@ export async function runGatewayUpdate(opts: UpdateRunnerOptions = {}): Promise<
|
|||||||
|
|
||||||
// Restore dist/control-ui/ to committed state to prevent dirty repo after update
|
// 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)
|
// (ui:build regenerates assets with new hashes, which would block future updates)
|
||||||
const restoreUiStep = await runStep(
|
// Only attempt if the directory is tracked by git (older checkouts may still track it)
|
||||||
step(
|
const lsFilesResult = await runCommand(
|
||||||
"restore control-ui",
|
["git", "-C", gitRoot, "ls-files", "--error-unmatch", "dist/control-ui/"],
|
||||||
["git", "-C", gitRoot, "checkout", "--", "dist/control-ui/"],
|
{ cwd: gitRoot, timeoutMs },
|
||||||
gitRoot,
|
).catch(() => null);
|
||||||
),
|
const controlUiTracked = lsFilesResult?.code === 0;
|
||||||
);
|
|
||||||
steps.push(restoreUiStep);
|
if (controlUiTracked) {
|
||||||
|
const restoreUiStep = await runStep(
|
||||||
|
step(
|
||||||
|
"restore control-ui",
|
||||||
|
["git", "-C", gitRoot, "checkout", "--", "dist/control-ui/"],
|
||||||
|
gitRoot,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
steps.push(restoreUiStep);
|
||||||
|
}
|
||||||
|
|
||||||
const doctorStep = await runStep(
|
const doctorStep = await runStep(
|
||||||
step(
|
step(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user