feat(settings): display native app version using expo-application

This commit is contained in:
2026-08-08 22:52:40 +02:00
parent 9e4777e0b9
commit 6802441553
14 changed files with 35 additions and 426 deletions
+9 -3
View File
@@ -19,15 +19,21 @@ PROFILE="${1:-debug}"
WEAR_DIR="$PROJECT_ROOT/targets/wearos"
FIREBASE_APP_ID="${FIREBASE_WEAR_APP_ID:-}"
# Read version from app.json (single source of truth)
VERSION=$(node -p "require('./app.json').expo.version")
WEAR_OFFSET=50000000
CODE=$(echo "$VERSION" | awk -F. '{printf "%d%02d%02d", $1, $2, $3}')
VERSION_CODE=$((CODE + WEAR_OFFSET))
cd "$WEAR_DIR"
echo "Building WearOS ($PROFILE)..."
echo "Building WearOS ($PROFILE) v$VERSION ($VERSION_CODE)..."
if [ "$PROFILE" = "release" ]; then
./gradlew assembleRelease
./gradlew assembleRelease -PversionName="$VERSION" -PversionCode="$VERSION_CODE"
APK_PATH="app/build/outputs/apk/release/app-release.apk"
else
./gradlew assembleDebug
./gradlew assembleDebug -PversionName="$VERSION" -PversionCode="$VERSION_CODE"
APK_PATH="app/build/outputs/apk/debug/app-debug.apk"
fi