-
Notifications
You must be signed in to change notification settings - Fork 477
[expo-cli] Add a eas:build:init command #2443
Conversation
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.
I'm not convinced that we should support options like profile and platform.
If this command is intended be ran only once we should setup both platforms and preferably default build profile
If we want to support running android and ios config separately we should modify eas.json if it exists.
@dsokal what do you think?
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.
I think I failed to communicate what needs to be done here, sorry. Here are the requirements:
- Ideally,
expo eas:build:init
should be run only once in the lifespan of the project. Because the EAS Builds commands shouldn't be visible for our users yet, I've implemented a kinda feature flag for them. Check out thisif
- https://github.com/expo/expo-cli/blob/master/packages/expo-cli/src/commands/eas-build/index.ts#L9 We want to streamline the process of setting up EAS Builds (creating eas.json and configuring project before build) thus the need for this command. This command should createeas.json
if it doesn't exist yet. We want to make this new command available to users without havingeas.json
but we don't want to list it in the help output. Regarding the latter part, I'm not sure if it's feasible with our version ofcommander
so we may need to implement some hack. expo eas:build:init
should set up both Android and iOS projects by default -> no need for theplatform
parameter.- I think there is no need for the
profile
param. The configuration phase seems unrelated to build profiles. expo eas:build
should check whether the project is configured and if it's not it should print an error saying thatexpo eas:build:init
should be run first. For Android, we can grep the project for theapply from: "./eas-build.gradle"
line. For iOS, I think we can always run the autoconfiguration steps.
6b41564
to
0e920fd
Compare
0e920fd
to
28646cc
Compare
b8f2cc9
to
10fca19
Compare
6e9609f
to
4196815
Compare
Looks good, please update the changelog! :) |
Also, remember to update documentation here https://github.com/expo/expo/tree/master/docs/pages/build |
Yeah, actually please open a PR to docs before merging this. |
We talked offline with dominik and we think that it's better to merge it earlier, just make sure that docs are ready before expo-cli is published. |
We want to add a separate command to configure the project for eas builds without having to actually start a build.
4196815
to
2ea6a56
Compare
Why
We want to add a separate command to configure the project for eas builds without having to actually start a build.
Test plan
Run
expo eas:build:init
in a project. I had some issues with generating credentials on iOS but it's unrelated to this PR as I haven't changed any logic for credentials.