Skip to content

Commit

Permalink
don't wait
Browse files Browse the repository at this point in the history
  • Loading branch information
szdziedzic committed May 13, 2024
1 parent b56f089 commit 043d088
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
19 changes: 15 additions & 4 deletions packages/eas-cli/src/build/runBuildAndSubmit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ export async function runBuildAndSubmitAsync(
flags: BuildFlags,
actor: Actor,
getDynamicPrivateProjectConfigAsync: DynamicConfigContextFn
): Promise<void> {
): Promise<{
buildIds: string[];
}> {
await vcsClient.ensureRepoExistsAsync();
await ensureRepoIsCleanAsync(vcsClient, flags.nonInteractive);

Expand Down Expand Up @@ -213,7 +215,9 @@ export async function runBuildAndSubmitAsync(
}

if (flags.localBuildOptions.localBuildMode === LocalBuildMode.LOCAL_BUILD_PLUGIN) {
return;
return {
buildIds: startedBuilds.map(({ build }) => build.id),
};
}

if (flags.localBuildOptions.localBuildMode === LocalBuildMode.INTERNAL) {
Expand Down Expand Up @@ -269,14 +273,18 @@ export async function runBuildAndSubmitAsync(
}

if (flags.localBuildOptions.localBuildMode) {
return;
return {
buildIds: startedBuilds.map(({ build }) => build.id),
};
}

if (!flags.wait) {
if (flags.json) {
printJsonOnlyOutput(startedBuilds.map(buildInfo => buildInfo.build));
}
return;
return {
buildIds: startedBuilds.map(({ build }) => build.id),
};
}

const { accountName } = Object.values(buildCtxByPlatform)[0];
Expand Down Expand Up @@ -317,6 +325,9 @@ export async function runBuildAndSubmitAsync(
}
exitWithNonZeroCodeIfSomeSubmissionsDidntFinish(completedSubmissions);
}
return {
buildIds: startedBuilds.map(({ build }) => build.id),
};
}

async function prepareAndStartBuildAsync({
Expand Down
12 changes: 10 additions & 2 deletions packages/eas-cli/src/commands/project/onboarding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export default class Onboarding extends EasCommand {
} else {
Log.log('🚀 Now we are going to trigger your first build');
Log.log();
await runBuildAndSubmitAsync(
const { buildIds } = await runBuildAndSubmitAsync(
graphqlClient,
analytics,
vcsClient,
Expand All @@ -280,7 +280,7 @@ export default class Onboarding extends EasCommand {
actor.preferences.onboarding.deviceType === OnboardingDeviceType.Simulator
? 'development-simulator'
: 'development',
wait: true,
wait: false,
clearCache: false,
json: false,
autoSubmit: false,
Expand All @@ -290,6 +290,14 @@ export default class Onboarding extends EasCommand {
actor,
getDynamicProjectConfigFn
);
const buildId = buildIds[0];
Log.log();
Log.log('🚀 You can now go back to the website to continue:');
const url = new URL(
`/onboarding/develop/set-up-project-on-your-machine?project=${app.slug}&accountId=${app.ownerAccount.id}&buildId=${buildId}`,
getExpoWebsiteBaseUrl()
).toString();
Log.log(`👉 ${link(url)}`);
}

const { __typename, ...previousPreferences } = actor.preferences.onboarding;
Expand Down

0 comments on commit 043d088

Please sign in to comment.