4a79c0072c
Docker image / Build (linux/amd64) (push) Has been cancelled
Docker image / Build (linux/arm64) (push) Has been cancelled
Docker image / Merge release multi-arch manifest (push) Has been cancelled
Docker image / Merge debug multi-arch manifest (push) Has been cancelled
Docker image / Build public push gateway (linux/amd64) (push) Has been cancelled
Docker image / Build public push gateway (linux/arm64) (push) Has been cancelled
Docker image / Publish public push gateway image (push) Has been cancelled
Harbor Buzz Orchestra / Python tests and lint (push) Has been cancelled
CI / Detect Changed Paths (push) Has been cancelled
CI / Rust Lint (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Desktop Core (push) Has been cancelled
CI / Desktop Smoke E2E (1) (push) Has been cancelled
CI / Desktop Smoke E2E (2) (push) Has been cancelled
CI / Desktop Smoke E2E (3) (push) Has been cancelled
CI / Desktop Smoke E2E (4) (push) Has been cancelled
CI / Desktop (push) Has been cancelled
CI / Desktop E2E Relay (push) Has been cancelled
CI / Desktop E2E Integration (1/2) (push) Has been cancelled
CI / Desktop E2E Integration (2/2) (push) Has been cancelled
CI / Desktop E2E Integration (push) Has been cancelled
CI / Backend Integration (relay e2e) (push) Has been cancelled
CI / Relay E2E (push) Has been cancelled
CI / Web (push) Has been cancelled
CI / Mobile (push) Has been cancelled
CI / Security (push) Has been cancelled
CI / Dead Token Reference Guard (push) Has been cancelled
CI / Server Cross-Compile (aarch64-unknown-linux-musl) (push) Has been cancelled
CI / Server Cross-Compile (x86_64-unknown-linux-musl) (push) Has been cancelled
CI / Windows Rust (x86_64-pc-windows-msvc) (push) Has been cancelled
CI / Desktop Build (macOS) (push) Has been cancelled
helm chart / lint + unittest + render matrix (push) Has been cancelled
helm chart / install on kind (gated) (push) Has been cancelled
helm chart / publish chart to GHCR (push) Has been cancelled
Mesh Lifecycle / Relay-Driven Mesh Lifecycle Smoke (push) Has been cancelled
Sprig image / Build (linux/amd64) (push) Has been cancelled
Sprig image / Build (linux/arm64) (push) Has been cancelled
Sprig image / Merge multi-arch manifest (push) Has been cancelled
Sprig / Build (aarch64-unknown-linux-musl) (push) Has been cancelled
Sprig / Build (x86_64-unknown-linux-musl) (push) Has been cancelled
Sprig / Publish rolling release (push) Has been cancelled
Sprig / Publish tagged release (push) Has been cancelled
Signed-off-by: cls_???? <908705107@qq.com>
55 lines
1.8 KiB
Bash
Executable File
55 lines
1.8 KiB
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}
|
|
if [[ "$TARGET" != *windows* ]]; then
|
|
SIDECARS+=(buzz-backend-kubernetes)
|
|
BUILD_HINT="cargo build --release -p buzz-acp -p buzz-agent -p buzz-backend-kubernetes -p buzz-dev-mcp -p git-credential-nostr -p buzz-cli"
|
|
else
|
|
BUILD_HINT="cargo build --release -p buzz-acp -p buzz-agent -p buzz-dev-mcp -p git-credential-nostr -p buzz-cli"
|
|
fi
|
|
BINARIES_DIR="desktop/src-tauri/binaries"
|
|
|
|
# When --target is passed explicitly to cargo (even if it matches the host),
|
|
# binaries land in target/<triple>/release/. Without --target, they land in
|
|
# target/release/. The script receives the target as $1 only when cargo was
|
|
# invoked with --target, so use the qualified path whenever $1 is set.
|
|
if [[ -n "${1:-}" ]]; then
|
|
SRC_DIR="target/${TARGET}/release"
|
|
else
|
|
SRC_DIR="target/release"
|
|
fi
|
|
|
|
# MSVC emits <name>.exe; Tauri's externalBin then expects binaries/<name>-<triple>.exe.
|
|
if [[ "$TARGET" == *windows* ]]; then
|
|
EXE=".exe"
|
|
else
|
|
EXE=""
|
|
fi
|
|
|
|
missing=()
|
|
for bin in "${SIDECARS[@]}"; do
|
|
[[ -f "$SRC_DIR/${bin}${EXE}" ]] || missing+=("${bin}${EXE}")
|
|
done
|
|
if [[ ${#missing[@]} -gt 0 ]]; then
|
|
echo "Error: missing release binaries in $SRC_DIR: ${missing[*]}" >&2
|
|
echo "Run '$BUILD_HINT' first." >&2
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p "$BINARIES_DIR"
|
|
for bin in "${SIDECARS[@]}"; do
|
|
destination="$BINARIES_DIR/${bin}-${TARGET}${EXE}"
|
|
cp "$SRC_DIR/${bin}${EXE}" "$destination"
|
|
|
|
# cp preserves the mode of an existing destination on macOS. Generated
|
|
# sidecar placeholders may not be executable, so make the bundled Unix
|
|
# binaries executable explicitly.
|
|
if [[ -z "$EXE" ]]; then
|
|
chmod 755 "$destination"
|
|
fi
|
|
done
|
|
echo "Sidecars bundled for $TARGET"
|