chore(scripts): add WearOS build and launcher icon scripts

This commit is contained in:
2026-08-08 12:52:21 +02:00
parent 065a564e1c
commit de90d9b937
2 changed files with 70 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
#!/bin/bash
set -e
PROFILE="${1:-debug}"
WEAR_DIR="targets/wearos"
FIREBASE_APP_ID="${FIREBASE_WEAR_APP_ID:-}"
cd "$WEAR_DIR"
echo "Building WearOS ($PROFILE)..."
if [ "$PROFILE" = "release" ]; then
./gradlew assembleRelease
APK_PATH="app/build/outputs/apk/release/app-release.apk"
else
./gradlew assembleDebug
APK_PATH="app/build/outputs/apk/debug/app-debug.apk"
fi
if [ ! -f "$APK_PATH" ]; then
echo "Error: APK not found at $APK_PATH"
exit 1
fi
APK_SIZE=$(du -h "$APK_PATH" | cut -f1)
echo "Build complete: $APK_PATH ($APK_SIZE)"
if [ -n "$FIREBASE_APP_ID" ]; then
if ! command -v firebase &> /dev/null; then
echo "Error: firebase CLI not found. Install with: npm install -g firebase-tools"
exit 1
fi
RELEASE_NOTES="${2:-}"
CMD=(firebase appdistribution:distribute "$APK_PATH" --app "$FIREBASE_APP_ID" --groups testers)
if [ -n "$RELEASE_NOTES" ]; then
CMD+=(--release-notes "$RELEASE_NOTES")
fi
echo "Uploading to Firebase App Distribution..."
"${CMD[@]}"
echo "Upload complete"
else
echo "Set FIREBASE_WEAR_APP_ID to upload to Firebase App Distribution"
echo " export FIREBASE_WEAR_APP_ID=1:123456789:android:abc123"
fi