feat(app): record an app's platform and refuse a release that doesn't match - #12
Merged
Merged
Conversation
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.
dpctlhad no idea what kind of app it was releasing to, so it would happily build an Android bundle and ship it to an iOS app. The server can't catch that either.dpctl app add --platform ios|android|expo-cng-ios|expo-cng-androidrecords the app type at creation. It can't be changed afterward.dpctl app lsgains a Platform column. Apps created before platforms existed read "React Native".release-reactnow fetches the app's platform first and refuses a bundle built for the other OS, naming the command to run instead.New ota-runtime.ts holds the platform labels and both guards. detectCodePushProjectKind keys off the config plugin in app.json, not the expo dependency since bare apps commonly use Expo modules, so the package alone proves nothing.
addAppnow resolves with the app the server created rather than the object it posted, so generated fields survive.