Skip to content

Commit 7718c31

Browse files
committed
Skip simulator builds; use endsWith for Android archive entry matching
1 parent f78aca0 commit 7718c31

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ export async function uploadEmbeddedBundleAsync(ctx: BuildContext<BuildJob>): Pr
1818
}
1919

2020
const { platform } = ctx.job;
21+
if (platform === Platform.IOS && (ctx.job as Ios.Job).simulator) {
22+
ctx.logger.info(
23+
'Skipping embedded bundle upload: simulator builds do not embed release update bundles.'
24+
);
25+
ctx.markBuildPhaseSkipped();
26+
return;
27+
}
28+
2129
const channel = ctx.job.updates?.channel;
2230
const projectDir = ctx.getReactNativeProjectDirectory();
2331

@@ -48,12 +56,12 @@ export async function uploadEmbeddedBundleAsync(ctx: BuildContext<BuildJob>): Pr
4856
const bundleEntry = entries.find(e =>
4957
platform === Platform.IOS
5058
? e.name.endsWith('/main.jsbundle')
51-
: e.name === 'assets/index.android.bundle'
59+
: e.name.endsWith('assets/index.android.bundle')
5260
);
5361
const manifestEntry = entries.find(e =>
5462
platform === Platform.IOS
5563
? e.name.includes('EXUpdates.bundle/app.manifest')
56-
: e.name === 'assets/app.manifest'
64+
: e.name.endsWith('assets/app.manifest')
5765
);
5866

5967
if (!bundleEntry || !manifestEntry) {

0 commit comments

Comments
 (0)