mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 16:50:43 +00:00
fix(update): verify packaged dist inventory
This commit is contained in:
@@ -4,6 +4,7 @@ import { spawnSync } from "node:child_process";
|
||||
import { existsSync, readdirSync } from "node:fs";
|
||||
import { pathToFileURL } from "node:url";
|
||||
import { formatErrorMessage } from "../src/infra/errors.ts";
|
||||
import { writePackageDistInventory } from "../src/infra/package-dist-inventory.ts";
|
||||
|
||||
const skipPrepackPreparedEnv = "OPENCLAW_PREPACK_PREPARED";
|
||||
const requiredPreparedPathGroups = [
|
||||
@@ -116,18 +117,24 @@ function runBuildSmoke(): void {
|
||||
run(process.execPath, ["scripts/test-built-bundled-channel-entry-smoke.mjs"]);
|
||||
}
|
||||
|
||||
function main(): void {
|
||||
async function writeDistInventory(): Promise<void> {
|
||||
await writePackageDistInventory(process.cwd());
|
||||
}
|
||||
|
||||
async function main(): Promise<void> {
|
||||
const pnpmCommand = process.platform === "win32" ? "pnpm.cmd" : "pnpm";
|
||||
if (shouldSkipPrepack()) {
|
||||
ensurePreparedArtifacts();
|
||||
await writeDistInventory();
|
||||
runBuildSmoke();
|
||||
return;
|
||||
}
|
||||
run(pnpmCommand, ["build"]);
|
||||
run(pnpmCommand, ["ui:build"]);
|
||||
await writeDistInventory();
|
||||
runBuildSmoke();
|
||||
}
|
||||
|
||||
if (import.meta.url === pathToFileURL(process.argv[1] ?? "").href) {
|
||||
main();
|
||||
await main();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user