[expo-updates] Add cli to resolve runtime version #27263
Merged
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.
Why
In the same way that #27119 was added to resolve the fingerprint using the current version of fingerprint in the project's expo-updates dependencies (rather than
eas-cli
's dependencies), we need to do the same thing for general runtime version resolution since that can differ from version to version ofexpo-updates
and@expo/config-plugins
, ...I noticed this because all of the
Updates.getRuntimeVersionNullableAsync
calls within eas-cli didn't resolve the correct runtime version (during builds for example: https://github.com/expo/eas-cli/blob/main/packages/eas-cli/src/build/metadata.ts#L41).How
Add new command,
npx expo-updates runtimeversion:resolve --platform <ios | android>
that gets the final runtime version that will be used by the build/update.Test Plan
In a project, run the command, see it works:
Checklist
npx expo prebuild
& EAS Build (eg: updated a module plugin).