mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Signed-off-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <wpfleger@block.xyz> Signed-off-by: Will Pfleger <wpfleger@squareup.com> Signed-off-by: Will Pfleger <wpfleger96@gmail.com> Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co> Co-authored-by: npub1fgdl5qqnh3k3f2xkqrvt7cujalhm623x4s7fdjdj5yrtp5fzjl9qrjpucw <4a1bfa0013bc6d14a8d600d8bf6392efefbd2a26ac3c96c9b2a106b0d12297ca@sprout-oss.stage.blox.sqprod.co> Co-authored-by: npub16v54tttfqacx9ycvc3k0ut0npj564ahcuajzy6qjvh57ntmsf4uq4806j2 <d32955ad69077062930cc46cfe2df30ca9aaf6f8e76422681265e9e9af704d78@sprout-oss.stage.blox.sqprod.co> Co-authored-by: Will Pfleger <wpfleger96@gmail.com>
32 lines
961 B
Bash
Executable File
32 lines
961 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
SIDECARS=(buzz-acp buzz-agent buzz-dev-mcp git-credential-nostr buzz)
|
|
HOST=$(rustc -vV | sed -n 's|host: ||p')
|
|
TARGET=${1:-$HOST}
|
|
BINARIES_DIR="desktop/src-tauri/binaries"
|
|
|
|
# A cross-target build (`cargo build --target <triple>`) emits to
|
|
# target/<triple>/release; a host build emits to target/release.
|
|
if [[ "$TARGET" == "$HOST" ]]; then
|
|
SRC_DIR="target/release"
|
|
else
|
|
SRC_DIR="target/${TARGET}/release"
|
|
fi
|
|
|
|
missing=()
|
|
for bin in "${SIDECARS[@]}"; do
|
|
[[ -f "$SRC_DIR/$bin" ]] || missing+=("$bin")
|
|
done
|
|
if [[ ${#missing[@]} -gt 0 ]]; then
|
|
echo "Error: missing release binaries in $SRC_DIR: ${missing[*]}" >&2
|
|
echo "Run 'cargo build --release -p buzz-acp -p buzz-agent -p buzz-dev-mcp -p git-credential-nostr -p buzz-cli' first." >&2
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p "$BINARIES_DIR"
|
|
for bin in "${SIDECARS[@]}"; do
|
|
cp "$SRC_DIR/$bin" "$BINARIES_DIR/${bin}-${TARGET}"
|
|
done
|
|
echo "Sidecars bundled for $TARGET"
|