chore: guard host runtime and simplify packaging
This commit is contained in:
@@ -82,9 +82,9 @@ if [ -f "$APP_BUNDLE/Contents/MacOS/ClawdisCLI" ]; then
|
||||
echo "Signing CLI helper"; sign_item "$APP_BUNDLE/Contents/MacOS/ClawdisCLI"
|
||||
fi
|
||||
|
||||
# Sign bundled relay runtime bits (bun, native addons, libvips dylibs)
|
||||
# Sign bundled relay payload (native addons, libvips dylibs)
|
||||
if [ -d "$APP_BUNDLE/Contents/Resources/Relay" ]; then
|
||||
find "$APP_BUNDLE/Contents/Resources/Relay" -type f \( -name "bun" -o -name "*.node" -o -name "*.dylib" \) -print0 | while IFS= read -r -d '' f; do
|
||||
find "$APP_BUNDLE/Contents/Resources/Relay" -type f \( -name "*.node" -o -name "*.dylib" \) -print0 | while IFS= read -r -d '' f; do
|
||||
echo "Signing relay payload: $f"; sign_item "$f"
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -111,15 +111,8 @@ echo "🧹 Removing unused pdfjs legacy bundle"
|
||||
rm -rf "$APP_ROOT/Contents/Resources/WebChat/vendor/pdfjs-dist/legacy"
|
||||
|
||||
RELAY_DIR="$APP_ROOT/Contents/Resources/Relay"
|
||||
BUN_SRC="${BUN_PATH:-$(command -v bun || true)}"
|
||||
if [ -z "$BUN_SRC" ] || [ ! -x "$BUN_SRC" ]; then
|
||||
echo "bun binary not found (set BUN_PATH to override)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "🧰 Staging relay runtime (bun + dist + node_modules)"
|
||||
cp "$BUN_SRC" "$RELAY_DIR/bun"
|
||||
chmod +x "$RELAY_DIR/bun"
|
||||
echo "🧰 Staging relay payload (dist + node_modules; expects system Node ≥22 or Bun ≥1.3)"
|
||||
rsync -a --delete --exclude "Clawdis.app" "$ROOT_DIR/dist/" "$RELAY_DIR/dist/"
|
||||
cp "$ROOT_DIR/package.json" "$RELAY_DIR/"
|
||||
cp "$ROOT_DIR/pnpm-lock.yaml" "$RELAY_DIR/"
|
||||
|
||||
Reference in New Issue
Block a user