Skip to content

Commit f78aca0

Browse files
committed
Move isEASUpdateConfigured check inside uploadEmbeddedBundleAsync
1 parent efc48cf commit f78aca0

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

packages/build-tools/src/builders/android.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import {
3030
import { uploadApplicationArchive } from '../utils/artifacts';
3131
import {
3232
configureExpoUpdatesIfInstalledAsync,
33-
isEASUpdateConfigured,
3433
resolveRuntimeVersionForExpoUpdatesIfConfiguredAsync,
3534
} from '../utils/expoUpdates';
3635
import { uploadEmbeddedBundleAsync } from '../utils/expoUpdatesEmbedded';
@@ -210,10 +209,7 @@ async function buildAsync(ctx: BuildContext<Android.Job>): Promise<void> {
210209
});
211210
});
212211

213-
if (
214-
ctx.env.EAS_UPDATE_EXPERIMENTAL_UPLOAD_EMBEDDED_BUNDLE &&
215-
(await isEASUpdateConfigured(ctx))
216-
) {
212+
if (ctx.env.EAS_UPDATE_EXPERIMENTAL_UPLOAD_EMBEDDED_BUNDLE) {
217213
await ctx.runBuildPhase(BuildPhase.UPLOAD_EMBEDDED_BUNDLE, async () => {
218214
await uploadEmbeddedBundleAsync(ctx);
219215
});

packages/build-tools/src/builders/ios.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { saveCcacheAsync } from '../steps/functions/saveBuildCache';
2323
import { uploadApplicationArchive } from '../utils/artifacts';
2424
import {
2525
configureExpoUpdatesIfInstalledAsync,
26-
isEASUpdateConfigured,
2726
resolveRuntimeVersionForExpoUpdatesIfConfiguredAsync,
2827
} from '../utils/expoUpdates';
2928
import { uploadEmbeddedBundleAsync } from '../utils/expoUpdatesEmbedded';
@@ -211,10 +210,7 @@ async function buildAsync(ctx: BuildContext<Ios.Job>): Promise<void> {
211210
});
212211
});
213212

214-
if (
215-
ctx.env.EAS_UPDATE_EXPERIMENTAL_UPLOAD_EMBEDDED_BUNDLE &&
216-
(await isEASUpdateConfigured(ctx))
217-
) {
213+
if (ctx.env.EAS_UPDATE_EXPERIMENTAL_UPLOAD_EMBEDDED_BUNDLE) {
218214
await ctx.runBuildPhase(BuildPhase.UPLOAD_EMBEDDED_BUNDLE, async () => {
219215
await uploadEmbeddedBundleAsync(ctx);
220216
});

packages/build-tools/src/utils/expoUpdatesEmbedded.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ import { findArtifacts } from './artifacts';
99
import { runEasCliCommand } from './easCli';
1010
import { resolveArtifactPath } from '../ios/resolve';
1111
import { BuildContext } from '../context';
12+
import { isEASUpdateConfigured } from './expoUpdates';
1213

1314
export async function uploadEmbeddedBundleAsync(ctx: BuildContext<BuildJob>): Promise<void> {
15+
if (!(await isEASUpdateConfigured(ctx))) {
16+
ctx.markBuildPhaseSkipped();
17+
return;
18+
}
19+
1420
const { platform } = ctx.job;
1521
const channel = ctx.job.updates?.channel;
1622
const projectDir = ctx.getReactNativeProjectDirectory();

0 commit comments

Comments
 (0)