diff --git a/.github/workflows/install-git-smoke.yml b/.github/workflows/install-git-smoke.yml index d3bc079..7e38394 100644 --- a/.github/workflows/install-git-smoke.yml +++ b/.github/workflows/install-git-smoke.yml @@ -20,3 +20,15 @@ jobs: CLAWDBOT_NO_ONBOARD: "1" CLAWDBOT_NO_PROMPT: "1" run: docker run --rm -t -e CLAWDBOT_NO_ONBOARD -e CLAWDBOT_NO_PROMPT clawdbot-install-git-smoke:ci + + install-cli-git-smoke: + runs-on: ubuntu-latest + steps: + - name: Checkout installer + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4 + + - name: Build git smoke image (install-cli.sh) + run: docker build -t openclaw-install-cli-git-smoke:ci -f scripts/docker/install-cli-git-smoke/Dockerfile . + + - name: Run git smoke (install-cli.sh) + run: docker run --rm -t openclaw-install-cli-git-smoke:ci diff --git a/.github/workflows/install-smoke.yml b/.github/workflows/install-smoke.yml index 2867097..2e9780b 100644 --- a/.github/workflows/install-smoke.yml +++ b/.github/workflows/install-smoke.yml @@ -75,3 +75,30 @@ jobs: docker run --rm -t \ -e CLAWDBOT_NO_ONBOARD \ clawdbot-install-nonroot:ci + + install-sh-git-smoke: + runs-on: ubuntu-latest + steps: + - name: Checkout installer + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4 + + - name: Build git smoke image (install.sh) + run: docker build -t clawdbot-install-git-smoke:ci -f scripts/docker/install-sh-git-smoke/Dockerfile . + + - name: Run git smoke (install.sh) + env: + CLAWDBOT_NO_ONBOARD: "1" + CLAWDBOT_NO_PROMPT: "1" + run: docker run --rm -t -e CLAWDBOT_NO_ONBOARD -e CLAWDBOT_NO_PROMPT clawdbot-install-git-smoke:ci + + install-cli-git-smoke: + runs-on: ubuntu-latest + steps: + - name: Checkout installer + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4 + + - name: Build git smoke image (install-cli.sh) + run: docker build -t openclaw-install-cli-git-smoke:ci -f scripts/docker/install-cli-git-smoke/Dockerfile . + + - name: Run git smoke (install-cli.sh) + run: docker run --rm -t openclaw-install-cli-git-smoke:ci diff --git a/scripts/docker/install-sh-git-smoke/Dockerfile b/scripts/docker/install-sh-git-smoke/Dockerfile index a689146..7124980 100644 --- a/scripts/docker/install-sh-git-smoke/Dockerfile +++ b/scripts/docker/install-sh-git-smoke/Dockerfile @@ -11,9 +11,9 @@ RUN apt-get update \ g++ \ && rm -rf /var/lib/apt/lists/* -COPY scripts/docker/install-sh-git-smoke/run.sh /usr/local/bin/clawdbot-install-git-smoke -COPY public/install.sh /opt/clawdbot-install.sh -RUN chmod +x /usr/local/bin/clawdbot-install-git-smoke \ - && chmod a+r /opt/clawdbot-install.sh +COPY scripts/docker/install-sh-git-smoke/run.sh /usr/local/bin/openclaw-install-git-smoke +COPY public/install.sh /opt/openclaw-install.sh +RUN chmod +x /usr/local/bin/openclaw-install-git-smoke \ + && chmod a+r /opt/openclaw-install.sh -ENTRYPOINT ["/usr/local/bin/clawdbot-install-git-smoke"] +ENTRYPOINT ["/usr/local/bin/openclaw-install-git-smoke"] diff --git a/scripts/docker/install-sh-git-smoke/run.sh b/scripts/docker/install-sh-git-smoke/run.sh index 387f61d..ea620d9 100644 --- a/scripts/docker/install-sh-git-smoke/run.sh +++ b/scripts/docker/install-sh-git-smoke/run.sh @@ -1,13 +1,15 @@ #!/usr/bin/env bash set -euo pipefail -LOCAL_INSTALL_PATH="/opt/clawdbot-install.sh" -if [[ -n "${CLAWDBOT_INSTALL_URL:-}" ]]; then +LOCAL_INSTALL_PATH="/opt/openclaw-install.sh" +if [[ -n "${OPENCLAW_INSTALL_URL:-}" ]]; then + INSTALL_URL="$OPENCLAW_INSTALL_URL" +elif [[ -n "${CLAWDBOT_INSTALL_URL:-}" ]]; then INSTALL_URL="$CLAWDBOT_INSTALL_URL" elif [[ -f "$LOCAL_INSTALL_PATH" ]]; then INSTALL_URL="file://${LOCAL_INSTALL_PATH}" else - INSTALL_URL="https://clawd.bot/install.sh" + INSTALL_URL="https://openclaw.ai/install.sh" fi curl_install() { @@ -22,10 +24,10 @@ echo "==> Installer: --help" curl_install | bash -s -- --help >/tmp/install-help.txt grep -q -- "--install-method" /tmp/install-help.txt -echo "==> Clone Clawdbot repo" -REPO_DIR="/tmp/moltbot-src" +echo "==> Clone Openclaw repo" +REPO_DIR="/tmp/openclaw-src" rm -rf "$REPO_DIR" -git clone --depth 1 https://github.com/moltbot/moltbot.git "$REPO_DIR" +git clone --depth 1 https://github.com/openclaw/openclaw.git "$REPO_DIR" echo "==> Verify autodetect defaults to npm (no TTY)" ( @@ -39,7 +41,7 @@ echo "==> Verify autodetect defaults to npm (no TTY)" cat /tmp/git-detect.out >&2 exit 1 fi - if ! sed -r 's/\x1b\[[0-9;]*m//g' /tmp/git-detect.out | grep -q "Install method: npm"; then + if ! sed -r 's/\x1b\[[0-9;]*m//g' /tmp/git-detect.out | grep -Eq "Install method: npm|Install method[[:space:]]+npm"; then echo "ERROR: expected autodetect to default to npm" >&2 cat /tmp/git-detect.out >&2 exit 1 @@ -53,18 +55,18 @@ echo "==> Install from Git (using detected checkout)" ) echo "==> Verify wrapper exists" -test -x "$HOME/.local/bin/clawdbot" +test -x "$HOME/.local/bin/openclaw" -echo "==> Verify clawdbot runs" +echo "==> Verify openclaw runs" export PATH="$HOME/.local/bin:$PATH" -clawdbot --help >/dev/null +openclaw --help >/dev/null echo "==> Verify version matches checkout" EXPECTED_VERSION="$(node -e "console.log(JSON.parse(require('fs').readFileSync('${REPO_DIR}/package.json','utf8')).version)")" -INSTALLED_VERSION="$(clawdbot --version 2>/dev/null | head -n 1 | tr -d '\r')" +INSTALLED_VERSION="$(openclaw --version 2>/dev/null | head -n 1 | tr -d '\r')" echo "installed=$INSTALLED_VERSION expected=$EXPECTED_VERSION" if [[ "$INSTALLED_VERSION" != "$EXPECTED_VERSION" ]]; then - echo "ERROR: expected clawdbot@$EXPECTED_VERSION, got $INSTALLED_VERSION" >&2 + echo "ERROR: expected openclaw@$EXPECTED_VERSION, got $INSTALLED_VERSION" >&2 exit 1 fi