Files
Jellify/scripts/ota-android.sh
Ritesh Shukla 4d560be350 Nitro OTA Package (#560)
Adds internal over-the-air update support

Powered by `react-native-nitro-modules`, this OTA functionality is faster than the previous implementation, and won't slow down the UI when updates are being applied since updates occur off the main thread
2025-10-21 14:28:53 -05:00

23 lines
789 B
Bash

version=$(jq -r '.version' "$(dirname "$0")/../package.json")
target_branch="nitro_${version}_android"
cd android
git clone https://github.com/Jellify-Music/App-Bundles.git
cd App-Bundles
if git ls-remote --exit-code --heads origin "$target_branch" >/dev/null 2>&1; then
echo "Branch '$target_branch' already exists on remote."
git checkout "$target_branch"
else
echo "Branch '$target_branch' does not exist on remote. Attempting to create it..."
git checkout -b "$target_branch"
fi
cd ../..
yarn createBundle:android
cd android/App-Bundles
bash ../../scripts/getRandomVersion.sh
git add .
git commit -m "OTA-Update - $(date +'%b %d %H:%M')"
git push https://x-access-token:$SIGNING_REPO_PAT@github.com/Jellify-Music/App-Bundles.git "$target_branch"
cd ..
rm -rf App-Bundles
cd ..