feature(cli): improve prebuild for arbitrary template platforms#22201
Merged
feature(cli): improve prebuild for arbitrary template platforms#22201
Conversation
EvanBacon
approved these changes
Apr 20, 2023
3 tasks
byCedric
added a commit
that referenced
this pull request
Apr 21, 2023
… unknown platforms (#22224) # Why Follow-up of #22201 # How When using arbitrary platforms, like `foobar`, the sort order is not defined. This results in errors like:  Instead, this change adds a default sorting order of `['dangerous']` when using arbitrary platforms. # Test Plan - Clone the example repository: https://github.com/byCedric/custom-prebuild-example - Create a tarball from template `$ cd ./template && npm pack` - Run `$ expo prebuild --platform macos --template ../template/custom-prebuild-template-1.0.0.tgz` This should not fail as the screenshot above. # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `expo prebuild` & EAS Build (eg: updated a module plugin).
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.
Why
This should improve users who have custom platforms for prebuild, like
tvos.How
expo prebuild --platformflag./${platform}folder before copying files overExamples
Platforms existing in the template
Platforms not existing in the template
Test Plan
$ yarn create expo-app ./test-platforms$ cd ./test-platforms$ yarn expo prebuild --platform windows --template https://github.com/microsoft/react-native-windows-samples/tree/main/samples/AppServiceDemoThe last step should use the
./windowsfolder from the AppServiceDemo as template files inside this project.If there are any plugins defined for that platform, they should be picked up automatically.
Checklist
expo prebuild& EAS Build (eg: updated a module plugin).