-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature(cli): allow using github url as template when prebuilding #26631
Conversation
8ab8b0b
to
c8d3025
Compare
ignore: [ | ||
'**/.gitattributes', | ||
'**/.npmignore', | ||
'**/ios/HelloWorld.xcworkspace/**', | ||
'**/ios/.xcode.env.local', | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me try if we can add inverse ignores. If we keep dot: false
(default), and explicitly add !**/ios/.xcode.env
as ignore, we could get rid of some options here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Negative ignores breaks picomatch, but we can provide multiple globs in the filter.
# Why Backporting from #26631 # How - Added filtering logic from `expo prebuild --template <github-url>` # Test Plan See tests - `$ bun create expo ./test --template expo-template-bare-minimum@49` - `$ cd ./test` - `$ rm -rf android ios` - `$ bun expo prebuild` - `$ git add . && git commit -m 'chore: initial prebuild'` - Delete everything, except `.git` - `$ create-expod . --no-install --template https://github.com/expo/expo/tree/sdk-49/templates/expo-template-bare-minimum` - Configure `com.test` in `app.json` as `android.package` and `ios.bundleIdentifier` - `$ bun install && bun expo prebuild --clean` - Result should pretty much be the same (there might be some differences in lockfiles and native files 🤷) > ℹ️ In these examples `create-expod` is an alias for `node <create-expo>/build/index.js` # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [x] 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 `npx expo prebuild` & EAS Build (eg: updated a module plugin).
…6631) # Why Porting functionality over from #26554 to `expo prebuild --template ...` # How - Added Tar `createGlobFilter` based on `picomatch` - Implemented identical `strip` and `filter` strategies from `create-expo` - Fixed template name when running `prebuild` with a git template # Test Plan - `$ bun create expo ./test --template expo-template-bare-minimum@49` - `$ cd ./test` - `$ bun install && bun expo prebuild --no-install` - `$ git commit -m 'chore: initial changes'` - `$ expod prebuild --no-install --template https://github.com/expo/expo/tree/sdk-49/templates/expo-template-bare-minimum` - Result should be similar. One cool thing here is that you can even specify specific commit in the template. E.g. ``` $ expod prebuild --no-install --template https://github.com/expo/expo/tree/30072b9637f0d2b964fe7f47f99f0e369336913a/templates/expo-template-bare-minimum ``` This would help us testing unreleased canaries, fixes and other stuff 😄 # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [x] 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 `npx expo prebuild` & EAS Build (eg: updated a module plugin).
Why
Porting functionality over from #26554 to
expo prebuild --template ...
How
createGlobFilter
based onpicomatch
strip
andfilter
strategies fromcreate-expo
prebuild
with a git templateTest Plan
$ bun create expo ./test --template expo-template-bare-minimum@49
$ cd ./test
$ bun install && bun expo prebuild --no-install
$ git commit -m 'chore: initial changes'
$ expod prebuild --no-install --template https://github.com/expo/expo/tree/sdk-49/templates/expo-template-bare-minimum
One cool thing here is that you can even specify specific commit in the template. E.g.
This would help us testing unreleased canaries, fixes and other stuff 😄
Checklist
npx expo prebuild
& EAS Build (eg: updated a module plugin).