mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
chore(installer): remove legacy cmd installer
This commit is contained in:
8
.github/workflows/website-installer-sync.yml
vendored
8
.github/workflows/website-installer-sync.yml
vendored
@@ -6,7 +6,6 @@ on:
|
||||
- scripts/install.sh
|
||||
- scripts/install-cli.sh
|
||||
- scripts/install.ps1
|
||||
- scripts/install.cmd
|
||||
- .github/workflows/website-installer-sync.yml
|
||||
push:
|
||||
branches: [main]
|
||||
@@ -14,7 +13,6 @@ on:
|
||||
- scripts/install.sh
|
||||
- scripts/install-cli.sh
|
||||
- scripts/install.ps1
|
||||
- scripts/install.cmd
|
||||
- .github/workflows/website-installer-sync.yml
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
@@ -130,10 +128,6 @@ jobs:
|
||||
shell: pwsh
|
||||
run: .\scripts\install.ps1 -DryRun -NoOnboard -InstallMethod npm
|
||||
|
||||
- name: install.cmd dry run
|
||||
shell: cmd
|
||||
run: set "OPENCLAW_INSTALL_PS1_URL=%GITHUB_WORKSPACE%\scripts\install.ps1" && .\scripts\install.cmd --dry-run --no-onboard --npm
|
||||
|
||||
sync-website:
|
||||
needs: [static, linux-docker, macos-installer, windows-installer]
|
||||
if: >
|
||||
@@ -158,7 +152,7 @@ jobs:
|
||||
cp openclaw/scripts/install.sh openclaw.ai/public/install.sh
|
||||
cp openclaw/scripts/install-cli.sh openclaw.ai/public/install-cli.sh
|
||||
cp openclaw/scripts/install.ps1 openclaw.ai/public/install.ps1
|
||||
cp openclaw/scripts/install.cmd openclaw.ai/public/install.cmd
|
||||
rm -f openclaw.ai/public/install.cmd
|
||||
chmod +x openclaw.ai/public/install.sh openclaw.ai/public/install-cli.sh
|
||||
|
||||
- name: Check for changes
|
||||
|
||||
@@ -35,7 +35,7 @@ const ANDROID_NATIVE_RE = /^(apps\/android\/|apps\/shared\/)/;
|
||||
const NODE_SCOPE_RE =
|
||||
/^(src\/|test\/|extensions\/|packages\/|scripts\/|ui\/|\.github\/|openclaw\.mjs$|package\.json$|pnpm-lock\.yaml$|pnpm-workspace\.yaml$|tsconfig.*\.json$|vitest.*\.ts$|tsdown\.config\.ts$|\.oxlintrc\.json$|\.oxfmtrc\.jsonc$)/;
|
||||
const WINDOWS_SCOPE_RE =
|
||||
/^(src\/process\/|src\/infra\/windows-install-roots\.ts$|src\/plugins\/import-specifier(?:\.test)?\.ts$|src\/shared\/(?:import-specifier|runtime-import)(?:\.test)?\.ts$|scripts\/(?:install\.ps1|install\.cmd|(?:npm-runner|pnpm-runner|ui|vitest-process-group)\.(?:mjs|js))$|test\/scripts\/(?:install-ps1|npm-runner|pnpm-runner|ui|vitest-process-group)\.test\.ts$|package\.json$|pnpm-lock\.yaml$|pnpm-workspace\.yaml$|\.github\/workflows\/ci\.yml$|\.github\/actions\/setup-node-env\/action\.yml$|\.github\/actions\/setup-pnpm-store-cache\/action\.yml$)/;
|
||||
/^(src\/process\/|src\/infra\/windows-install-roots\.ts$|src\/plugins\/import-specifier(?:\.test)?\.ts$|src\/shared\/(?:import-specifier|runtime-import)(?:\.test)?\.ts$|scripts\/(?:install\.ps1|(?:npm-runner|pnpm-runner|ui|vitest-process-group)\.(?:mjs|js))$|test\/scripts\/(?:install-ps1|npm-runner|pnpm-runner|ui|vitest-process-group)\.test\.ts$|package\.json$|pnpm-lock\.yaml$|pnpm-workspace\.yaml$|\.github\/workflows\/ci\.yml$|\.github\/actions\/setup-node-env\/action\.yml$|\.github\/actions\/setup-pnpm-store-cache\/action\.yml$)/;
|
||||
const WINDOWS_TEST_SCOPE_RE =
|
||||
/^(src\/process\/(?:exec\.windows|windows-command)\.test\.ts$|src\/infra\/windows-install-roots\.test\.ts$|src\/plugins\/import-specifier\.test\.ts$|src\/shared\/runtime-import\.test\.ts$|test\/scripts\/(?:npm-runner|pnpm-runner|ui|vitest-process-group)\.test\.ts$)/;
|
||||
const TEST_ONLY_PATH_RE =
|
||||
@@ -47,7 +47,7 @@ const NATIVE_ONLY_RE =
|
||||
const FAST_INSTALL_SMOKE_SCOPE_RE =
|
||||
/^(Dockerfile$|\.npmrc$|package\.json$|pnpm-lock\.yaml$|pnpm-workspace\.yaml$|scripts\/ci-changed-scope\.mjs$|scripts\/postinstall-bundled-plugins\.mjs$|scripts\/e2e\/(?:Dockerfile(?:\.qr-import)?|agents-delete-shared-workspace-docker\.sh|gateway-network-docker\.sh)$|extensions\/[^/]+\/(?:package\.json|openclaw\.plugin\.json)$|\.github\/workflows\/install-smoke\.yml$|\.github\/actions\/setup-node-env\/action\.yml$)/;
|
||||
const FULL_INSTALL_SMOKE_SCOPE_RE =
|
||||
/^(Dockerfile$|\.npmrc$|package\.json$|pnpm-lock\.yaml$|pnpm-workspace\.yaml$|scripts\/ci-changed-scope\.mjs$|scripts\/install(?:-cli)?\.sh$|scripts\/install\.ps1$|scripts\/install\.cmd$|scripts\/test-install-sh-docker\.sh$|scripts\/docker\/|scripts\/e2e\/(?:Dockerfile(?:\.qr-import)?|qr-import-docker\.sh|bun-global-install-smoke\.sh)$|\.github\/workflows\/(?:install-smoke|website-installer-sync)\.yml$|\.github\/actions\/setup-node-env\/action\.yml$)/;
|
||||
/^(Dockerfile$|\.npmrc$|package\.json$|pnpm-lock\.yaml$|pnpm-workspace\.yaml$|scripts\/ci-changed-scope\.mjs$|scripts\/install(?:-cli)?\.sh$|scripts\/install\.ps1$|scripts\/test-install-sh-docker\.sh$|scripts\/docker\/|scripts\/e2e\/(?:Dockerfile(?:\.qr-import)?|qr-import-docker\.sh|bun-global-install-smoke\.sh)$|\.github\/workflows\/(?:install-smoke|website-installer-sync)\.yml$|\.github\/actions\/setup-node-env\/action\.yml$)/;
|
||||
const FAST_INSTALL_SMOKE_RUNTIME_SCOPE_RE = /^src\/(?:channels|gateway|plugin-sdk|plugins)\//;
|
||||
const NODE_FAST_PLUGIN_CONTRACT_SCOPE_RE =
|
||||
/^(src\/plugins\/contracts\/(?:inventory\/bundled-capability-metadata|registry|tts-contract-suites)\.ts$|scripts\/test-projects(?:\.test-support)?\.mjs$|test\/scripts\/test-projects\.test\.ts$)/;
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
REM OpenClaw Windows CMD installer
|
||||
REM Usage:
|
||||
REM curl -fsSL https://openclaw.ai/install.cmd -o install.cmd && install.cmd --no-onboard && del install.cmd
|
||||
|
||||
set "TAG=latest"
|
||||
set "INSTALL_METHOD=npm"
|
||||
set "NO_ONBOARD=0"
|
||||
set "NO_GIT_UPDATE=0"
|
||||
set "DRY_RUN=0"
|
||||
set "TAG_SET=0"
|
||||
set "INSTALL_PS1_URL="
|
||||
|
||||
:parse_args
|
||||
if "%~1"=="" goto :args_done
|
||||
|
||||
if /i "%~1"=="--help" goto :usage
|
||||
if /i "%~1"=="--git" set "INSTALL_METHOD=git"
|
||||
if /i "%~1"=="--npm" set "INSTALL_METHOD=npm"
|
||||
if /i "%~1"=="--no-onboard" set "NO_ONBOARD=1"
|
||||
if /i "%~1"=="--no-git-update" set "NO_GIT_UPDATE=1"
|
||||
if /i "%~1"=="--dry-run" set "DRY_RUN=1"
|
||||
|
||||
if /i "%~1"=="--tag" (
|
||||
if not "%~2"=="" (
|
||||
set "TAG=%~2"
|
||||
set "TAG_SET=1"
|
||||
shift
|
||||
)
|
||||
shift
|
||||
goto :parse_args
|
||||
)
|
||||
|
||||
set "ARG=%~1"
|
||||
if not "%ARG%"=="" (
|
||||
if not "%ARG:~0,1%"=="-" (
|
||||
if "%TAG_SET%"=="0" (
|
||||
set "TAG=%ARG%"
|
||||
set "TAG_SET=1"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
shift
|
||||
goto :parse_args
|
||||
|
||||
:args_done
|
||||
|
||||
curl --version >nul 2>&1
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo curl is required but not available. Please install curl or use PowerShell installer. >&2
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
powershell -NoProfile -Command "$PSVersionTable.PSVersion.Major" >nul 2>&1
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo PowerShell is required but not available. Use install.ps1 directly or install PowerShell. >&2
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
set "TMP=%TEMP%\openclaw-install.ps1"
|
||||
REM TMP may include spaces; always quote "%TMP%" when used.
|
||||
if not "%OPENCLAW_INSTALL_PS1_URL%"=="" set "INSTALL_PS1_URL=%OPENCLAW_INSTALL_PS1_URL%"
|
||||
if "%INSTALL_PS1_URL%"=="" set "INSTALL_PS1_URL=https://openclaw.ai/install.ps1"
|
||||
|
||||
if exist "%INSTALL_PS1_URL%" (
|
||||
copy /Y "%INSTALL_PS1_URL%" "%TMP%" >nul
|
||||
) else (
|
||||
curl -fsSL "%INSTALL_PS1_URL%" -o "%TMP%"
|
||||
)
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo Failed to download install.ps1 >&2
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
set "PS_ARGS=-Tag ""%TAG%"" -InstallMethod ""%INSTALL_METHOD%"""
|
||||
if "%NO_ONBOARD%"=="1" set "PS_ARGS=%PS_ARGS% -NoOnboard"
|
||||
if "%NO_GIT_UPDATE%"=="1" set "PS_ARGS=%PS_ARGS% -NoGitUpdate"
|
||||
if "%DRY_RUN%"=="1" set "PS_ARGS=%PS_ARGS% -DryRun"
|
||||
|
||||
if "%DRY_RUN%"=="1" echo [OK] Dry run ^(delegating to install.ps1^)
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -File "%TMP%" %PS_ARGS%
|
||||
set "RESULT=%ERRORLEVEL%"
|
||||
|
||||
del /f "%TMP%" >nul 2>&1
|
||||
|
||||
if %RESULT% neq 0 exit /b %RESULT%
|
||||
exit /b 0
|
||||
|
||||
:usage
|
||||
echo Usage: install.cmd [options] [tag]
|
||||
echo.
|
||||
echo Options:
|
||||
echo --git Install from git checkout
|
||||
echo --npm Install via npm ^(default^)
|
||||
echo --tag <ver> Tag/version to install ^(default: latest^)
|
||||
echo --no-onboard Skip onboarding
|
||||
echo --no-git-update Skip git pull for existing checkout
|
||||
echo --dry-run Print what would happen ^(no changes^)
|
||||
exit /b 0
|
||||
@@ -309,15 +309,6 @@ describe("detectChangedScope", () => {
|
||||
runChangedSmoke: true,
|
||||
runControlUiI18n: false,
|
||||
});
|
||||
expect(detectChangedScope(["scripts/install.cmd"])).toEqual({
|
||||
runNode: true,
|
||||
runMacos: false,
|
||||
runAndroid: false,
|
||||
runWindows: true,
|
||||
runSkillsPython: false,
|
||||
runChangedSmoke: true,
|
||||
runControlUiI18n: false,
|
||||
});
|
||||
});
|
||||
|
||||
it("runs changed-smoke for install and packaging surfaces", () => {
|
||||
@@ -491,10 +482,6 @@ describe("detectChangedScope", () => {
|
||||
runFastInstallSmoke: true,
|
||||
runFullInstallSmoke: true,
|
||||
});
|
||||
expect(detectInstallSmokeScope(["scripts/install.cmd"])).toEqual({
|
||||
runFastInstallSmoke: true,
|
||||
runFullInstallSmoke: true,
|
||||
});
|
||||
expect(detectInstallSmokeScope(["Dockerfile"])).toEqual({
|
||||
runFastInstallSmoke: true,
|
||||
runFullInstallSmoke: true,
|
||||
|
||||
@@ -14,12 +14,7 @@ describe("website installer sync workflow", () => {
|
||||
const workflow = readFileSync(WORKFLOW_PATH, "utf8");
|
||||
|
||||
it("treats all website installer scripts as OpenClaw-owned inputs", () => {
|
||||
for (const path of [
|
||||
"scripts/install.sh",
|
||||
"scripts/install-cli.sh",
|
||||
"scripts/install.ps1",
|
||||
"scripts/install.cmd",
|
||||
]) {
|
||||
for (const path of ["scripts/install.sh", "scripts/install-cli.sh", "scripts/install.ps1"]) {
|
||||
expect(workflow).toContain(path);
|
||||
expect(detectInstallSmokeScope([path]).runFullInstallSmoke).toBe(true);
|
||||
}
|
||||
@@ -40,8 +35,8 @@ describe("website installer sync workflow", () => {
|
||||
expect(workflow).toContain("windows-installer:");
|
||||
expect(workflow).toContain("runs-on: windows-latest");
|
||||
expect(workflow).toContain(".\\scripts\\install.ps1 -DryRun");
|
||||
expect(workflow).toContain("OPENCLAW_INSTALL_PS1_URL=%GITHUB_WORKSPACE%\\scripts\\install.ps1");
|
||||
expect(workflow).toContain(".\\scripts\\install.cmd --dry-run");
|
||||
expect(workflow).not.toContain("install.cmd dry run");
|
||||
expect(workflow).not.toContain(".\\scripts\\install.cmd");
|
||||
});
|
||||
|
||||
it("syncs verified scripts to openclaw.ai only after all installer checks pass", () => {
|
||||
@@ -53,7 +48,7 @@ describe("website installer sync workflow", () => {
|
||||
"cp openclaw/scripts/install-cli.sh openclaw.ai/public/install-cli.sh",
|
||||
);
|
||||
expect(workflow).toContain("cp openclaw/scripts/install.ps1 openclaw.ai/public/install.ps1");
|
||||
expect(workflow).toContain("cp openclaw/scripts/install.cmd openclaw.ai/public/install.cmd");
|
||||
expect(workflow).toContain("rm -f openclaw.ai/public/install.cmd");
|
||||
expect(workflow).toContain("bun run build");
|
||||
expect(workflow).toContain("git push origin HEAD:main");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user