mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:30:42 +00:00
ci(release): skip baseline lifecycle scripts in upgrade checks
This commit is contained in:
@@ -737,6 +737,7 @@ async function runUpgradeLane(params) {
|
||||
env,
|
||||
packageSpec: params.baselineSpec,
|
||||
logPath: join(params.logsDir, "upgrade-install-baseline.log"),
|
||||
ignoreScripts: true,
|
||||
});
|
||||
} else {
|
||||
await installTarballPackage({
|
||||
@@ -744,6 +745,7 @@ async function runUpgradeLane(params) {
|
||||
env,
|
||||
tgzPath: params.baselineTgz,
|
||||
logPath: join(params.logsDir, "upgrade-install-baseline.log"),
|
||||
ignoreScripts: true,
|
||||
restoreBundledPluginPostinstall: false,
|
||||
});
|
||||
}
|
||||
@@ -2343,6 +2345,7 @@ async function installTarballPackage(params) {
|
||||
packageSpec: params.tgzPath,
|
||||
logPath: params.logPath,
|
||||
timeoutMs: params.timeoutMs,
|
||||
ignoreScripts: params.ignoreScripts,
|
||||
});
|
||||
if (
|
||||
params.restoreBundledPluginPostinstall !== false &&
|
||||
@@ -2366,15 +2369,7 @@ async function installPackageSpec(params) {
|
||||
rmSync(installedPackageRoot(params.lane.prefixDir), { force: true, recursive: true });
|
||||
await runCommand(
|
||||
npmCommand(),
|
||||
[
|
||||
"install",
|
||||
"-g",
|
||||
params.packageSpec,
|
||||
"--omit=dev",
|
||||
"--no-fund",
|
||||
"--no-audit",
|
||||
"--loglevel=notice",
|
||||
],
|
||||
buildNpmGlobalInstallArgs(params.packageSpec, { ignoreScripts: params.ignoreScripts }),
|
||||
{
|
||||
cwd: params.lane.homeDir,
|
||||
env: installEnv,
|
||||
@@ -2384,6 +2379,19 @@ async function installPackageSpec(params) {
|
||||
);
|
||||
}
|
||||
|
||||
export function buildNpmGlobalInstallArgs(packageSpec, options = {}) {
|
||||
return [
|
||||
"install",
|
||||
"-g",
|
||||
packageSpec,
|
||||
"--omit=dev",
|
||||
"--no-fund",
|
||||
"--no-audit",
|
||||
...(options.ignoreScripts ? ["--ignore-scripts"] : []),
|
||||
"--loglevel=notice",
|
||||
];
|
||||
}
|
||||
|
||||
function installTimeoutMs() {
|
||||
return process.platform === "win32" ? 45 * 60 * 1000 : 20 * 60 * 1000;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import {
|
||||
buildWindowsDevUpdateToolchainCheckScript,
|
||||
buildWindowsFreshShellVersionCheckScript,
|
||||
buildInstalledBrowserOverrideImportProbeScript,
|
||||
buildNpmGlobalInstallArgs,
|
||||
buildWindowsPathBootstrapScript,
|
||||
canConnectToLoopbackPort,
|
||||
buildDiscordSmokeGuildsConfig,
|
||||
@@ -204,6 +205,19 @@ describe("scripts/openclaw-cross-os-release-checks", () => {
|
||||
expect(allowlist).not.toContain("web-readability");
|
||||
});
|
||||
|
||||
it("can stage packaged-upgrade baselines without npm lifecycle scripts", () => {
|
||||
expect(buildNpmGlobalInstallArgs("openclaw@2026.5.2", { ignoreScripts: true })).toEqual([
|
||||
"install",
|
||||
"-g",
|
||||
"openclaw@2026.5.2",
|
||||
"--omit=dev",
|
||||
"--no-fund",
|
||||
"--no-audit",
|
||||
"--ignore-scripts",
|
||||
"--loglevel=notice",
|
||||
]);
|
||||
});
|
||||
|
||||
it("keeps cross-OS live smoke agent turns on GPT-5-safe timeouts and minimal context", () => {
|
||||
const source = readFileSync("scripts/openclaw-cross-os-release-checks.ts", "utf8");
|
||||
const providerOverride = "models.providers.${params.providerConfig.extensionId}";
|
||||
|
||||
Reference in New Issue
Block a user