Apply pending OTA zips on boot; take check/download out of core - #400
Open
shanerbaner82 wants to merge 5 commits into
Open
Apply pending OTA zips on boot; take check/download out of core#400shanerbaner82 wants to merge 5 commits into
shanerbaner82 wants to merge 5 commits into
Conversation
added 5 commits
August 27, 2026 06:58
Stash Documents/app/.env before installUpdate replaces the tree, then restore it verbatim over the extracted payload. Skip restore when no prior .env exists. Prefer pending.zip when several updates sit in Documents/updates.
Extract any *.zip in {appStorageDir}/updates/ into laravel after the
bundled payload, one zip per boot. Stash and restore .env verbatim,
write .ota_applied with the bundled identity so the older bundle is
not re-extracted, and roll back to the bundle when that identity
changes (newer store build).
OTA check/download lives in the mobile-ota plugin. Core still applies pending zips from Documents/updates on boot via ensureAppExists.
OTA check/download lives in the mobile-ota plugin. Core still extracts the bundled zip and applies pending zips from updates/ on boot.
DEBUG already re-extracts the bundled payload every boot. Applying a leftover pending zip on top of that hid local PHP. Versioned builds still apply pending on next boot.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OTA check and download never belonged in the runtime. They talk to Bifrost, they care about zip names and UX (manual / prompt / silent), and that is all plugin work. Core should do one thing on boot: if a pending zip is sitting there, extract it instead of (or after) the bundled payload, and do not wipe the app's
.envwhen you do.That is this PR. iOS already applied
Documents/updates/*.zipon next launch; Android now does the same with{appStorageDir}/updates/*.zip. Both stash.envaround the extract. The in-core Bifrost client is gone on both platforms. DEBUG still re-extracts the bundle every boot sonative:runshows local PHP, and it now skips leftover pending zips, otherwise a queued update covers your working copy. Versioned store builds still apply pending on the next cold start. Bundled names stayapp.zip/laravel_bundle.zip(renaming those is a packager lockstep break). A pending zip is additive, so existing installs are fine. The plugin that dropspending.zipwill need a min core version that understands this.Five commits, in order: preserve
.envon iOS apply, Android next-boot apply, rip the iOS client, rip the Android client, skip pending in DEBUG.