-
Notifications
You must be signed in to change notification settings - Fork 85
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
[eas-cli] Makes eas.json configuration to only run on update:configure #1598
[eas-cli] Makes eas.json configuration to only run on update:configure #1598
Conversation
/changelog-entry bug-fix Makes eas.json configuration to only run on |
Size Change: -162 B (0%) Total Size: 40.3 MB
|
Codecov Report
@@ Coverage Diff @@
## main #1598 +/- ##
==========================================
+ Coverage 51.94% 51.94% +0.01%
==========================================
Files 464 464
Lines 16243 16243
Branches 3381 3381
==========================================
+ Hits 8435 8436 +1
+ Misses 7791 7790 -1
Partials 17 17
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@@ -46,6 +49,8 @@ export default class UpdateConfigure extends EasCommand { | |||
platform, | |||
}); | |||
|
|||
await ensureEASUpdateIsConfiguredInEasJsonAsync(projectDir); |
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.
update:configure
is supposed to prepare the project for updates, but with this change, you are removing all config steps and only updating eas.json. e.g. You are not checking if expo-updates is installed.
Based on the PR description I would expect that changes in this PR will not affect update:configure
method and the only difference for the update call would be skipping that eas.json update.
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 there may be a misunderstanding here.
This line (52) is inside the runAsync()
function on the update:configure
command. When running update:configure
, we will run two key functions:
ensureEASUpdateIsConfiguredAsync()
: This installs expo-updates, configures app.json, etcensureEASUpdateIsConfiguredInEasJsonAsync()
: This adds channel names to eas.json
Previously, that second function, ensureEASUpdateIsConfiguredInEasJsonAsync()
, was inside of ensureEASUpdateIsConfiguredAsync()
, which made it run whenever anyone ran update
.
This PR removes the eas.json configuration part to only run on update:configure
, and makes it so that update
does not run the eas.json configuration part.
When running update
, we will still install expo-updates + configure app.json etc. Here's where we call that in the update
command:
await ensureEASUpdateIsConfiguredAsync(graphqlClient, { |
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.
yes, you are right, sorry. I didn't see that both functions were called in configure
Merging because I got two checkmarks and I think I answered @wkozyra95's question adequately. If you still think that this is an issue, please let me know and we can discuss/revert |
Checklist
/changelog-entry [breaking-change|new-feature|bug-fix|chore] [message]
and CHANGELOG.md will be updated automatically.Why
This PR is a bug fix. I landed a PR where when running
eas update:configure
, we set thechannel
property in build profiles. However, I placed that logic in a place that is also called when runningeas update ...
. (We want to set up expo-updates and configure app.json if needed when runningeas update
)This is not the desired behavior for this configuration however. We only want to set up channels in build profiles when a developer is running
eas update:configure
. By removing this from theeas update
command, it allows developers to set a channel in their native code, then use EAS Build, and not have their native channel overwritten.How
ensureEASUpdateIsConfiguredInEasJsonAsync()
function out of the shared configuration and call it in theupdate:configure
command.Test Plan
npc create-expo-app myApp
eas build:configure
eas update
. Expect that there will be no channels configured in eas.json, while app.json will be configured.eas update:configure
. Expect that eas.json is configured with channels.