react-native-bspatch 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/tools/build_ota.sh +16 -13
package/package.json
CHANGED
package/tools/build_ota.sh
CHANGED
|
@@ -98,16 +98,18 @@ if [ "$ACTION" = "setup" ]; then
|
|
|
98
98
|
fi
|
|
99
99
|
|
|
100
100
|
# ── Build environment ──────────────────────────────────────────────────────
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
pkill -f "
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
101
|
+
if [ "$ACTION" = "ota" ]; then
|
|
102
|
+
echo "Preparing build environment..."
|
|
103
|
+
# Kill any existing Metro processes to prevent file locks
|
|
104
|
+
pkill -f "react-native/local-cli/cli.js" || true
|
|
105
|
+
pkill -f "metro-config/src/index.js" || true
|
|
106
|
+
|
|
107
|
+
# Manually clear metro cache if it exists (robust vs ENOTEMPTY error)
|
|
108
|
+
METRO_CACHE_DIR=$(node -e "console.log(require('os').tmpdir())")/metro-cache
|
|
109
|
+
if [ -d "$METRO_CACHE_DIR" ]; then
|
|
110
|
+
echo " Cleaning Metro cache..."
|
|
111
|
+
rm -rf "$METRO_CACHE_DIR"
|
|
112
|
+
fi
|
|
111
113
|
fi
|
|
112
114
|
|
|
113
115
|
mkdir -p "$ROOT/android/output"
|
|
@@ -123,8 +125,7 @@ if [ "$ACTION" != "setup" ]; then
|
|
|
123
125
|
BASE_URL="${OTA_BASE_URL:-}"
|
|
124
126
|
BASE_FOLDER="${OTA_FOLDER:-ota}"
|
|
125
127
|
|
|
126
|
-
echo "
|
|
127
|
-
echo " Using Folder: $BASE_FOLDER"
|
|
128
|
+
echo " Storage: ${OTA_R2_BUCKET:+R2 $OTA_R2_BUCKET → }$BASE_URL/$BASE_FOLDER"
|
|
128
129
|
|
|
129
130
|
if [[ -n "${OTA_R2_BUCKET:-}" ]]; then
|
|
130
131
|
R2_URL="https://${OTA_R2_ACCOUNT_ID:?set OTA_R2_ACCOUNT_ID}.r2.cloudflarestorage.com/${OTA_R2_BUCKET}"
|
|
@@ -234,7 +235,9 @@ fi
|
|
|
234
235
|
# Confirm in a terminal (Enter keeps the detected version); CI / -y / --release-version skip it
|
|
235
236
|
if [ -t 0 ] && [ "$CONFIRM_VERSION" = true ] && [ -z "$APP_VERSION_ARG" ]; then
|
|
236
237
|
echo ""
|
|
237
|
-
|
|
238
|
+
if [ "$ACTION" = "reset" ]; then PROMPT_WHAT="Release version to RESET ($FLAVOR_LOWER, android + ios)"
|
|
239
|
+
else PROMPT_WHAT="Release version for ${PLATFORM_ARG:-android + ios} ($FLAVOR_LOWER)"; fi
|
|
240
|
+
read -r -p " $PROMPT_WHAT [${APP_VERSION:-none detected}]: " INPUT_VERSION
|
|
238
241
|
INPUT_VERSION="${INPUT_VERSION// /}"
|
|
239
242
|
APP_VERSION="${INPUT_VERSION:-$APP_VERSION}"
|
|
240
243
|
fi
|