@@ -59,6 +59,17 @@ if [ -z "$LATEST_TAG" ]; then
5959fi
6060echo " -> $LATEST_TAG "
6161
62+ # --- Migrate old single hash → per-image hashes (no rebuild) ---
63+ orb -m " $OPENCLAW_VM_NAME " bash -lc '
64+ if [ -f ~/.openclaw/.sandbox-build-hash ] && [ ! -f ~/.openclaw/.sandbox-hash-base ]; then
65+ cd ~/openclaw
66+ cat Dockerfile.sandbox scripts/sandbox-setup.sh 2>/dev/null | sha256sum | cut -c1-64 > ~/.openclaw/.sandbox-hash-base
67+ cat Dockerfile.sandbox-common scripts/sandbox-common-setup.sh 2>/dev/null | sha256sum | cut -c1-64 > ~/.openclaw/.sandbox-hash-common
68+ cat Dockerfile.sandbox-browser scripts/sandbox-browser-setup.sh 2>/dev/null | sha256sum | cut -c1-64 > ~/.openclaw/.sandbox-hash-browser
69+ rm -f ~/.openclaw/.sandbox-build-hash
70+ fi
71+ ' 2> /dev/null || true
72+
6273# Check if already on the latest tag
6374CURRENT_HEAD=$( orb -m " $OPENCLAW_VM_NAME " bash -lc " cd ~/openclaw && git rev-parse HEAD 2>/dev/null" )
6475TAG_COMMIT=$( orb -m " $OPENCLAW_VM_NAME " bash -lc " cd ~/openclaw && git rev-parse '$LATEST_TAG ^{commit}' 2>/dev/null" )
@@ -103,17 +114,6 @@ orb -m "$OPENCLAW_VM_NAME" bash -lc "cd ~/openclaw && pnpm ui:build"
103114echo " $MSG_CMD_UPDATE_REINSTALL "
104115orb -m " $OPENCLAW_VM_NAME " bash -lc " cd ~/openclaw && sudo npm install -g ."
105116
106- # --- Migrate old single hash → per-image hashes (no rebuild) ---
107- orb -m " $OPENCLAW_VM_NAME " bash -lc '
108- if [ -f ~/.openclaw/.sandbox-build-hash ] && [ ! -f ~/.openclaw/.sandbox-hash-base ]; then
109- cd ~/openclaw
110- cat Dockerfile.sandbox scripts/sandbox-setup.sh 2>/dev/null | sha256sum | cut -c1-64 > ~/.openclaw/.sandbox-hash-base
111- cat Dockerfile.sandbox-common scripts/sandbox-common-setup.sh 2>/dev/null | sha256sum | cut -c1-64 > ~/.openclaw/.sandbox-hash-common
112- cat Dockerfile.sandbox-browser scripts/sandbox-browser-setup.sh 2>/dev/null | sha256sum | cut -c1-64 > ~/.openclaw/.sandbox-hash-browser
113- rm -f ~/.openclaw/.sandbox-build-hash
114- fi
115- ' 2> /dev/null || true
116-
117117# --- Per-image sandbox hash detection ---
118118BUILD_BASE=false
119119BUILD_COMMON=false
0 commit comments