capix-code 1.5.4 → 1.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/build.sh +14 -0
package/package.json
CHANGED
package/scripts/build.sh
CHANGED
|
@@ -117,6 +117,20 @@ MCPWRAPPER
|
|
|
117
117
|
(cd "$DIR/launcher" && cargo build --locked --release)
|
|
118
118
|
cp "$DIR/launcher/target/release/capix-code$EXE_SUFFIX" "$ARTIFACT/bin/capix-code$EXE_SUFFIX"
|
|
119
119
|
chmod 0755 "$ARTIFACT/bin/capix-code$EXE_SUFFIX"
|
|
120
|
+
|
|
121
|
+
# ── Post-compile branding pass (same-byte-length only) ─────────────────
|
|
122
|
+
# Replace "opencode"/"OpenCode" in the compiled binary using EXACT same
|
|
123
|
+
# byte-length replacements to avoid corrupting Bun's length-dependent offsets.
|
|
124
|
+
ENGINE_BIN="$ARTIFACT/engine/capix-engine$EXE_SUFFIX"
|
|
125
|
+
if [ -f "$ENGINE_BIN" ]; then
|
|
126
|
+
echo "▸ Applying branding pass to engine binary..."
|
|
127
|
+
# Same-length replacements only: "opencode"→"capixcod", "OpenCode"→"CapixCod"
|
|
128
|
+
perl -pi -e '
|
|
129
|
+
s/OpenCode/CapixCod/g;
|
|
130
|
+
s/opencode/capixcod/g;
|
|
131
|
+
' "$ENGINE_BIN"
|
|
132
|
+
echo " ✓ branding pass applied to engine binary (same-length only)"
|
|
133
|
+
fi
|
|
120
134
|
"$DIR/scripts/assert-artifact.sh" "$ARTIFACT"
|
|
121
135
|
"$DIR/scripts/assert-customer-brand.sh" "$ARTIFACT"
|
|
122
136
|
echo "✓ Customer artifact staged: $ARTIFACT"
|