test: preseed dev channel in Parallels update · openclaw/openclaw@9a051d2
steipete
·
2026-05-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -854,6 +854,14 @@ mkdir -p "$bootstrap_root"
|
854 | 854 | `set -eu |
855 | 855 | rm -rf ${shellQuote(`${home}/openclaw`)} |
856 | 856 | export PATH=${shellQuote(`/tmp/openclaw-smoke-pnpm-bootstrap/node_modules/.bin:${guestPath}`)} |
| 857 | +${guestNode} - <<'JS' |
| 858 | +const fs = require("node:fs"); |
| 859 | +const path = require("node:path"); |
| 860 | +const configPath = path.join(process.env.HOME || ${JSON.stringify(home)}, ".openclaw", "openclaw.json"); |
| 861 | +const config = JSON.parse(fs.readFileSync(configPath, "utf8")); |
| 862 | +config.update = { ...(config.update || {}), channel: "dev" }; |
| 863 | +fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + "\\n"); |
| 864 | +JS |
857 | 865 | /usr/bin/env NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_DISABLE_BUNDLED_PLUGINS=1 ${guestNode} ${guestOpenClawEntry} update --channel dev --yes --json |
858 | 866 | ${guestNode} ${guestOpenClawEntry} --version |
859 | 867 | ${guestNode} ${guestOpenClawEntry} update status --json`, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -143,7 +143,7 @@ Wait-OpenClawGateway
|
143 | 143 | Invoke-OpenClaw models set ${psSingleQuote(input.auth.modelId)} |
144 | 144 | Invoke-OpenClaw config set agents.defaults.skipBootstrap true --strict-json |
145 | 145 | Invoke-OpenClaw config set tools.profile minimal |
146 | | -Invoke-OpenClaw config set models.providers.openai '{"baseUrl":"https://api.openai.com/v1","models":[],"timeoutSeconds":300}' --strict-json |
| 146 | +Invoke-OpenClaw config set models.providers.openai ${psSingleQuote('{"baseUrl":"https://api.openai.com/v1","models":[],"timeoutSeconds":300}')} --strict-json |
147 | 147 | ${windowsAgentWorkspaceScript("Parallels npm update smoke test assistant.")} |
148 | 148 | Set-Item -Path ('Env:' + ${psSingleQuote(input.auth.apiKeyEnv)}) -Value ${psSingleQuote(input.auth.apiKeyValue)} |
149 | 149 | Invoke-OpenClaw agent --local --agent main --session-id parallels-npm-update-windows --message 'Reply with exact ASCII text OK only.' --thinking minimal --json`; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -798,6 +798,13 @@ if ((Test-Path $logPath) -or (Test-Path $donePath)) {
|
798 | 798 | $portableGit = Join-Path (Join-Path (Join-Path $env:LOCALAPPDATA 'OpenClaw\\deps') 'portable-git') '' |
799 | 799 | $env:PATH = "$portableGit\\cmd;$portableGit\\mingw64\\bin;$portableGit\\usr\\bin;$env:PATH" |
800 | 800 | where.exe git.exe |
| 801 | +$configPath = Join-Path $env:USERPROFILE '.openclaw\\openclaw.json' |
| 802 | +$config = Get-Content $configPath -Raw | ConvertFrom-Json |
| 803 | +if ($null -eq $config.update) { |
| 804 | + $config | Add-Member -MemberType NoteProperty -Name update -Value ([pscustomobject]@{}) |
| 805 | +} |
| 806 | +$config.update | Add-Member -Force -MemberType NoteProperty -Name channel -Value 'dev' |
| 807 | +$config | ConvertTo-Json -Depth 100 | Set-Content -Path $configPath -Encoding utf8 |
801 | 808 | $env:OPENCLAW_DISABLE_BUNDLED_PLUGINS = '1' |
802 | 809 | Invoke-OpenClaw update --channel dev --yes --json |
803 | 810 | if ($LASTEXITCODE -ne 0) { throw "openclaw update failed with exit code $LASTEXITCODE" } |
@@ -883,7 +890,7 @@ Invoke-OpenClaw config set agents.defaults.skipBootstrap true --strict-json
|
883 | 890 | if ($LASTEXITCODE -ne 0) { throw "config set failed" } |
884 | 891 | Invoke-OpenClaw config set tools.profile minimal |
885 | 892 | if ($LASTEXITCODE -ne 0) { throw "tools profile config set failed" } |
886 | | -Invoke-OpenClaw config set models.providers.openai '{"baseUrl":"https://api.openai.com/v1","models":[],"timeoutSeconds":300}' --strict-json |
| 893 | +Invoke-OpenClaw config set models.providers.openai ${psSingleQuote('{"baseUrl":"https://api.openai.com/v1","models":[],"timeoutSeconds":300}')} --strict-json |
887 | 894 | if ($LASTEXITCODE -ne 0) { throw "openai provider timeout config set failed" } |
888 | 895 | ${windowsAgentWorkspaceScript("Parallels Windows smoke test assistant.")} |
889 | 896 | Set-Item -Path ('Env:' + ${psSingleQuote(this.auth.apiKeyEnv)}) -Value ${psSingleQuote(this.auth.apiKeyValue)} |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -332,6 +332,14 @@ console.log(resolveUbuntuVmName("Ubuntu missing"));
|
332 | 332 | expect(combined).toContain("where.exe git.exe"); |
333 | 333 | }); |
334 | 334 | |
| 335 | +it("preseeds dev update channel before stable-to-dev update lanes", () => { |
| 336 | +const macos = readFileSync(TS_PATHS.macos, "utf8"); |
| 337 | +const windows = readFileSync(TS_PATHS.windows, "utf8"); |
| 338 | + |
| 339 | +expect(macos).toContain('channel: "dev"'); |
| 340 | +expect(windows).toContain("Name channel -Value 'dev'"); |
| 341 | +}); |
| 342 | + |
335 | 343 | it("passes aggregate model overrides into each OS fresh lane", () => { |
336 | 344 | const script = readFileSync(TS_PATHS.npmUpdate, "utf8"); |
337 | 345 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。