Fix APK native-gating: JS-only releases no longer rebuild the APK - #120
Merged
Conversation
…ersion
The gate reads the previous runtimeVersion out of the apk-latest release
notes with a regex whose [0-9.]* class greedily swallowed the period that
ends the sentence ("runtimeVersion: 1.3.0. JS updates…"), yielding
"1.3.0.". That never equals the clean "1.3.0" from app.config.js, so
every JS-only release looked native and rebuilt the APK needlessly
(v1.4.1 did exactly this).
Anchor the capture on a trailing digit so the period is left out, and
drop the period right after the version in the notes as a second guard.
Merged
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.
What
The production-APK workflow is supposed to skip the build on JS-only releases and only rebuild when the native
runtimeVersionchanges. It never skipped.Root cause
release-apk.ymlreads the previousruntimeVersionfrom theapk-latestrelease notes:The regex
\([0-9][0-9.]*\)greedily includes the sentence-ending period, capturing1.3.0.. That never equals the clean1.3.0fromapp.config.js, so the gate always concludes "native change" and rebuilds.Caught by the v1.4.1 release test — a JS-only release that wrongly triggered a full APK rebuild (harmless output, wasted one EAS build).
Fix
[0-9][0-9.]*[0-9]) so the period is left out.—) as a second guard.Verified locally against the current
apk-latestnote (period form), the new em-dash form, and a two-part minor (1.10.2) — all parse to a clean version.No app/runtime change; workflow-only.