-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-signed.sh
More file actions
executable file
·60 lines (51 loc) · 1.84 KB
/
build-signed.sh
File metadata and controls
executable file
·60 lines (51 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$SCRIPT_DIR"
# Handle --clean flag
if [ "${1:-}" = "--clean" ]; then
echo "==> Cleaning..."
bazel clean --expunge 2>/dev/null || true
cargo clean 2>/dev/null || true
rm -rf frontend/build frontend/.svelte-kit frontend/node_modules
rm -rf crates/xpressclaw-tauri/binaries
echo " Done."
echo ""
fi
# Load signing config
if [ -f .env.signing ]; then
source .env.signing
fi
# Prompt for app-specific password if not set
if [ -z "${APPLE_PASSWORD:-}" ]; then
echo -n "Apple app-specific password: "
read -s APPLE_PASSWORD
echo
export APPLE_PASSWORD
fi
TARGET_TRIPLE=$(rustc --print host-tuple 2>/dev/null || rustc -vV | grep host | cut -d' ' -f2)
echo "==> Target: ${TARGET_TRIPLE}"
# 1. Build with Bazel (CLI + frontend + server)
echo "==> Building with Bazel..."
bazel build //crates/xpressclaw-cli:xpressclaw
# 2. Copy Bazel-built CLI as Tauri sidecar
echo "==> Copying CLI sidecar..."
mkdir -p crates/xpressclaw-tauri/binaries
cp "bazel-bin/crates/xpressclaw-cli/xpressclaw" "crates/xpressclaw-tauri/binaries/xpressclaw-${TARGET_TRIPLE}"
echo " Sidecar: crates/xpressclaw-tauri/binaries/xpressclaw-${TARGET_TRIPLE}"
# 3. Build Tauri desktop app with signing + notarization
echo "==> Building Tauri app (signed + notarized)..."
echo " Signing identity: ${APPLE_SIGNING_IDENTITY:-not set}"
echo " Team ID: ${APPLE_TEAM_ID:-not set}"
npx @tauri-apps/cli build --target "${TARGET_TRIPLE}"
# 4. Show output
echo ""
echo "==> Done!"
echo ""
DMG=$(find "target/${TARGET_TRIPLE}/release/bundle/dmg" -name "*.dmg" 2>/dev/null || find target/release/bundle/dmg -name "*.dmg" 2>/dev/null || echo "")
if [ -n "$DMG" ]; then
echo "DMG: ${DMG}"
ls -lh $DMG
else
echo "No DMG found. Check target/*/release/bundle/ for output."
fi