Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/eas-cli/src/build/runBuildAndSubmit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import {
import { checkExpoSdkIsSupportedAsync } from '../project/expoSdk';
import { validateMetroConfigForManagedWorkflowAsync } from '../project/metroConfig';
import {
getOwnerAccountForProjectIdAsync,
isExpoUpdatesInstalledAsDevDependency,
isExpoUpdatesInstalledOrAvailable,
isUsingEASUpdate,
Expand All @@ -78,6 +79,7 @@ import { downloadAndMaybeExtractAppAsync } from '../utils/download';
import { truthy } from '../utils/expodash/filter';
import { printJsonOnlyOutput } from '../utils/json';
import { ProfileData, getProfilesAsync } from '../utils/profiles';
import { maybeWarnAboutUsageOveragesAsync } from '../utils/usage/checkForOverages';
import { Client } from '../vcs/vcs';

let metroConfigValidated = false;
Expand Down Expand Up @@ -409,6 +411,14 @@ async function prepareAndStartBuildAsync({
env,
});

if (flags.localBuildOptions.localBuildMode) {
const account = await getOwnerAccountForProjectIdAsync(graphqlClient, buildCtx.projectId);
await maybeWarnAboutUsageOveragesAsync({
graphqlClient,
accountId: account.id,
});
}

if (moreBuilds) {
Log.newLine();
const appPlatform = toAppPlatform(buildProfile.platform);
Expand Down
9 changes: 0 additions & 9 deletions packages/eas-cli/src/commands/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ import { EasNonInteractiveAndJsonFlags } from '../../commandUtils/flags';
import { StatuspageServiceName } from '../../graphql/generated';
import Log, { link } from '../../log';
import { RequestedPlatform, selectRequestedPlatformAsync } from '../../platform';
import { getOwnerAccountForProjectIdAsync } from '../../project/projectUtils';
import { selectAsync } from '../../prompts';
import uniq from '../../utils/expodash/uniq';
import { enableJsonOutput } from '../../utils/json';
import { ProfileData } from '../../utils/profiles';
import { maybeWarnAboutEasOutagesAsync } from '../../utils/statuspageService';
import { maybeWarnAboutUsageOveragesAsync } from '../../utils/usage/checkForOverages';

interface RawBuildFlags {
platform?: string;
Expand Down Expand Up @@ -163,13 +161,6 @@ export default class Build extends EasCommand {
? [StatuspageServiceName.EasBuild, StatuspageServiceName.EasSubmit]
: [StatuspageServiceName.EasBuild]
);

const { projectId } = await getDynamicPrivateProjectConfigAsync();
const account = await getOwnerAccountForProjectIdAsync(graphqlClient, projectId);
await maybeWarnAboutUsageOveragesAsync({
graphqlClient,
accountId: account.id,
});
}

const flagsWithPlatform = await this.ensurePlatformSelectedAsync(flags);
Expand Down