Skip to content

Commit e54101f

Browse files
committed
fix(scripts): remove opencode binary requirement from build scripts
opencode is no longer bundled — detected via PATH at runtime instead
1 parent ed19af7 commit e54101f

File tree

2 files changed

+3
-43
lines changed

2 files changed

+3
-43
lines changed

scripts/build-app.sh

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -46,32 +46,7 @@ cd "$ROOT_DIR"
4646
# ── Step 1: Check binaries directory ─────────────────────────────
4747
step "Checking binaries directory..."
4848
mkdir -p "$BINARIES_DIR"
49-
50-
# Check opencode binary
51-
case "$OS" in
52-
Linux) OPENCODE_BIN="$BINARIES_DIR/opencode-x86_64-unknown-linux-gnu" ;;
53-
Darwin)
54-
if [ "$ARCH" = "arm64" ]; then
55-
OPENCODE_BIN="$BINARIES_DIR/opencode-aarch64-apple-darwin"
56-
else
57-
OPENCODE_BIN="$BINARIES_DIR/opencode-x86_64-apple-darwin"
58-
fi
59-
;;
60-
*) fail "Unsupported OS: $OS" ;;
61-
esac
62-
63-
if [ ! -f "$OPENCODE_BIN" ]; then
64-
warn "opencode binary not found at $OPENCODE_BIN"
65-
if [ -f "$SCRIPT_DIR/download-opencode.sh" ]; then
66-
step "Downloading opencode binary..."
67-
bash "$SCRIPT_DIR/download-opencode.sh"
68-
ok "opencode downloaded"
69-
else
70-
fail "No opencode binary and no download-opencode.sh. Add opencode to $BINARIES_DIR manually."
71-
fi
72-
else
73-
ok "opencode binary present"
74-
fi
49+
ok "opencode is detected via PATH at runtime (not bundled)"
7550

7651
# ── Step 2: Build sidecar native binary ──────────────────────────
7752
if [ "$SKIP_SIDECAR" = true ]; then

scripts/build-sidecar.sh

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -114,24 +114,9 @@ case "$OS" in
114114
esac
115115

116116
if [ -f "$OPENCODE_BIN" ]; then
117-
echo " - opencode binary already present, skipping download"
118-
elif [ "$SKIP_OPENCODE_DOWNLOAD" = "1" ]; then
119-
echo " - skipping opencode download (OPENLINEAR_SKIP_OPENCODE_DOWNLOAD=1)"
120-
elif [ -f "$SCRIPT_DIR/download-opencode.sh" ]; then
121-
echo "==> Downloading opencode binary..."
122-
if "$SCRIPT_DIR/download-opencode.sh"; then
123-
echo " - opencode binary downloaded"
124-
else
125-
echo " ! failed to download opencode binary, continuing without a bundled copy"
126-
fi
117+
echo " - opencode binary already present"
127118
else
128-
echo " ! opencode binary not found at $OPENCODE_BIN"
129-
echo " Get it from: https://github.com/anomalyco/opencode/releases"
130-
fi
131-
132-
if [ ! -f "$OPENCODE_BIN" ]; then
133-
echo " ! opencode binary is required for desktop packaging" >&2
134-
exit 1
119+
echo " - opencode not bundled (detected via PATH at runtime)"
135120
fi
136121

137122
echo "==> Build complete!"

0 commit comments

Comments
 (0)