惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
博客园 - 【当耐特】
M
MIT News - Artificial intelligence
D
Docker
博客园 - 三生石上(FineUI控件)
博客园 - 司徒正美
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
月光博客
月光博客
S
SegmentFault 最新的问题
Jina AI
Jina AI
Blog — PlanetScale
Blog — PlanetScale
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - Franky
L
LangChain Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(installer): honor git install versions · openclaw/ope...
steipete · 2026-05-13 · via Recent Commits to openclaw:main

@@ -364,6 +364,128 @@ run_pnpm() {

364364

"${PNPM_CMD[@]}" "$@"

365365

}

366366367+

resolve_git_openclaw_ref() {

368+

local requested="${OPENCLAW_VERSION:-latest}"

369+

local resolved_version=""

370+371+

case "$requested" in

372+

""|latest)

373+

resolved_version="$("$(npm_bin)" view "openclaw" "dist-tags.${requested:-latest}" 2>/dev/null || true)"

374+

if [[ -n "$resolved_version" ]]; then

375+

echo "v${resolved_version}"

376+

return 0

377+

fi

378+

echo "main"

379+

return 0

380+

;;

381+

next|beta)

382+

resolved_version="$("$(npm_bin)" view "openclaw" "dist-tags.${requested:-latest}" 2>/dev/null || true)"

383+

if [[ -n "$resolved_version" ]]; then

384+

echo "v${resolved_version}"

385+

return 0

386+

fi

387+

echo "$requested"

388+

return 0

389+

;;

390+

main)

391+

echo "main"

392+

return 0

393+

;;

394+

v[0-9]*)

395+

echo "$requested"

396+

return 0

397+

;;

398+

[0-9]*.[0-9]*.[0-9]*)

399+

echo "v${requested}"

400+

return 0

401+

;;

402+

*)

403+

echo "$requested"

404+

return 0

405+

;;

406+

esac

407+

}

408+409+

checkout_git_openclaw_ref() {

410+

local repo_dir="$1"

411+

local ref="$2"

412+413+

if [[ -z "$ref" ]]; then

414+

return 0

415+

fi

416+417+

git -C "$repo_dir" fetch --tags origin

418+419+

if [[ "$ref" == "main" ]]; then

420+

git -C "$repo_dir" checkout main

421+

if [[ "$GIT_UPDATE" == "1" ]]; then

422+

git -C "$repo_dir" pull --rebase || true

423+

fi

424+

return 0

425+

fi

426+427+

if git -C "$repo_dir" rev-parse --verify --quiet "refs/tags/${ref}^{commit}" >/dev/null; then

428+

git -C "$repo_dir" checkout --detach "$ref"

429+

return 0

430+

fi

431+432+

if git -C "$repo_dir" ls-remote --exit-code --heads origin "$ref" >/dev/null 2>&1; then

433+

git -C "$repo_dir" checkout -B "$ref" "origin/$ref"

434+

if [[ "$GIT_UPDATE" == "1" ]]; then

435+

git -C "$repo_dir" pull --rebase || true

436+

fi

437+

return 0

438+

fi

439+440+

if git -C "$repo_dir" rev-parse --verify --quiet "${ref}^{commit}" >/dev/null; then

441+

git -C "$repo_dir" checkout --detach "$ref"

442+

return 0

443+

fi

444+445+

fail "Requested git version not found: ${ref}"

446+

}

447+448+

repo_pnpm_spec() {

449+

local repo_dir="$1"

450+

local package_json="${repo_dir}/package.json"

451+452+

if [[ ! -f "$package_json" ]]; then

453+

return 1

454+

fi

455+456+

sed -n -E 's/^[[:space:]]*"packageManager"[[:space:]]*:[[:space:]]*"([^"]+)".*/\1/p' "$package_json" | head -n1

457+

}

458+459+

activate_repo_pnpm_version() {

460+

local repo_dir="$1"

461+

local spec

462+

local version

463+

local corepack_cmd=""

464+465+

spec="$(repo_pnpm_spec "$repo_dir" || true)"

466+

if [[ "$spec" != pnpm@* ]]; then

467+

return 0

468+

fi

469+470+

version="${spec#pnpm@}"

471+

version="${version%%+*}"

472+

if [[ -z "$version" ]]; then

473+

return 0

474+

fi

475+476+

if [[ -x "$(node_dir)/bin/corepack" ]]; then

477+

corepack_cmd="$(node_dir)/bin/corepack"

478+

elif command -v corepack >/dev/null 2>&1; then

479+

corepack_cmd="$(command -v corepack)"

480+

fi

481+482+

if [[ -n "$corepack_cmd" ]]; then

483+

log "Activating repo pnpm ${version}"

484+

"$corepack_cmd" prepare "pnpm@${version}" --activate >/dev/null 2>&1 || true

485+

detect_pnpm_cmd || true

486+

fi

487+

}

488+367489

install_node() {

368490

local os

369491

local arch

@@ -588,18 +710,20 @@ install_openclaw_from_git() {

588710

git clone "$repo_url" "$repo_dir"

589711

fi

590712591-

if [[ "$GIT_UPDATE" == "1" ]]; then

592-

if [[ -z "$(git -C "$repo_dir" status --porcelain 2>/dev/null || true)" ]]; then

593-

git -C "$repo_dir" pull --rebase || true

594-

else

595-

log "Repo is dirty; skipping git pull"

596-

fi

713+

local git_ref

714+

git_ref="$(resolve_git_openclaw_ref)"

715+

if [[ -z "$(git -C "$repo_dir" status --porcelain 2>/dev/null || true)" ]]; then

716+

log "Using git ref: ${git_ref}"

717+

checkout_git_openclaw_ref "$repo_dir" "$git_ref"

718+

else

719+

log "Repo is dirty; skipping git checkout/update"

597720

fi

598721599722

cleanup_legacy_submodules "$repo_dir"

600723

ensure_pnpm_git_prepare_allowlist "$repo_dir"

724+

activate_repo_pnpm_version "$repo_dir"

601725602-

SHARP_IGNORE_GLOBAL_LIBVIPS="$SHARP_IGNORE_GLOBAL_LIBVIPS" run_pnpm -C "$repo_dir" install

726+

SHARP_IGNORE_GLOBAL_LIBVIPS="$SHARP_IGNORE_GLOBAL_LIBVIPS" run_pnpm -C "$repo_dir" install --frozen-lockfile

603727604728

if ! run_pnpm -C "$repo_dir" ui:build; then

605729

log "UI build failed; continuing (CLI may still work)"