Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

[expo-cli] Add a eas:build:init command #2443

Merged
merged 1 commit into from
Aug 30, 2020
Merged

Conversation

satya164
Copy link
Contributor

@satya164 satya164 commented Aug 10, 2020

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.

Kapture 2020-08-25 at 20 13 45

Copy link
Contributor

@wkozyra95 wkozyra95 left a 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?

Copy link
Contributor

@dsokal dsokal left a 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 this if - 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 create eas.json if it doesn't exist yet. We want to make this new command available to users without having eas.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 of commander 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 the platform 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 that expo eas:build:init should be run first. For Android, we can grep the project for the apply from: "./eas-build.gradle" line. For iOS, I think we can always run the autoconfiguration steps.

packages/expo-cli/src/commands/eas-build/init/action.ts Outdated Show resolved Hide resolved
@satya164 satya164 force-pushed the @satya164/build-init branch 2 times, most recently from 6b41564 to 0e920fd Compare August 25, 2020 18:15
@satya164 satya164 marked this pull request as ready for review August 25, 2020 18:27
@satya164 satya164 force-pushed the @satya164/build-init branch 3 times, most recently from b8f2cc9 to 10fca19 Compare August 25, 2020 19:38
@satya164 satya164 force-pushed the @satya164/build-init branch 2 times, most recently from 6e9609f to 4196815 Compare August 26, 2020 13:47
@dsokal
Copy link
Contributor

dsokal commented Aug 27, 2020

Looks good, please update the changelog! :)

@wkozyra95
Copy link
Contributor

Also, remember to update documentation here https://github.com/expo/expo/tree/master/docs/pages/build

@dsokal
Copy link
Contributor

dsokal commented Aug 27, 2020

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.
#2442 - please update the docs for this feature too

@wkozyra95
Copy link
Contributor

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.
#2442 - please update the docs for this feature too

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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants