Skip to content

Commit

Permalink
[eas-cli] Makes eas.json configuration to only run on update:configure (
Browse files Browse the repository at this point in the history
#1598)

* Makes eas.json configuration to only run on update:configure

* update CHANGELOG.md
  • Loading branch information
jonsamp authored Jan 4, 2023
1 parent 9245657 commit 5694bb9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This is the log of notable changes to EAS CLI and related packages.

### 🐛 Bug fixes

- Makes eas.json configuration to only run on `update:configure`. ([#1598](https://github.com/expo/eas-cli/pull/1598) by [@jonsamp](https://github.com/jonsamp))
- Fix issue with invisible build info in some terminals in the `eas build:run` and `eas build:resign` commands. ([#1602](https://github.com/expo/eas-cli/pull/1602) by [@szdziedzic](https://github.com/szdziedzic))

### 🧹 Chores
Expand Down
7 changes: 6 additions & 1 deletion packages/eas-cli/src/commands/update/configure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import EasCommand from '../../commandUtils/EasCommand';
import { EASNonInteractiveFlag } from '../../commandUtils/flags';
import Log from '../../log';
import { RequestedPlatform } from '../../platform';
import { ensureEASUpdateIsConfiguredAsync } from '../../update/configure';
import {
ensureEASUpdateIsConfiguredAsync,
ensureEASUpdateIsConfiguredInEasJsonAsync,
} from '../../update/configure';

export default class UpdateConfigure extends EasCommand {
static override description = 'configure the project to support EAS Update';
Expand Down Expand Up @@ -46,6 +49,8 @@ export default class UpdateConfigure extends EasCommand {
platform,
});

await ensureEASUpdateIsConfiguredInEasJsonAsync(projectDir);

Log.addNewLineIfNone();
Log.log(`🎉 Your app is configured with EAS Update!`);
Log.newLine();
Expand Down
4 changes: 1 addition & 3 deletions packages/eas-cli/src/update/configure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ async function ensureEASUpdateIsConfiguredNativelyAsync(
* Make sure EAS Build profiles are configured to work with EAS Update by adding channels to build profiles.
*/

async function ensureEASUpdateIsConfiguredInEasJsonAsync(projectDir: string): Promise<void> {
export async function ensureEASUpdateIsConfiguredInEasJsonAsync(projectDir: string): Promise<void> {
const easJsonPath = EasJsonAccessor.formatEasJsonPath(projectDir);

if (!(await fs.pathExists(easJsonPath))) {
Expand Down Expand Up @@ -363,8 +363,6 @@ export async function ensureEASUpdateIsConfiguredAsync(
workflows,
});

await ensureEASUpdateIsConfiguredInEasJsonAsync(projectDir);

if (projectChanged || !hasExpoUpdates) {
await ensureEASUpdateIsConfiguredNativelyAsync(graphqlClient, {
exp: expWithUpdates,
Expand Down

0 comments on commit 5694bb9

Please sign in to comment.