feat(settings): display native app version using expo-application
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user