Skip to content

Commit

Permalink
Revert "[eas-cli] [ENG-9957] Don't overwrite distribution for simulat…
Browse files Browse the repository at this point in the history
…or build…"

This reverts commit 315b5b2.
  • Loading branch information
szdziedzic authored Jan 31, 2024
1 parent 315b5b2 commit c527fe1
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 274 deletions.
2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ This is the log of notable changes to EAS CLI and related packages.

### 🧹 Chores

- Add simulator flag to metadata. ([#2073](https://github.com/expo/eas-cli/pull/2073) by [@radoslawkrzemien](https://github.com/radoslawkrzemien))

## [7.1.2](https://github.com/expo/eas-cli/releases/tag/v7.1.2) - 2024-01-30

### 🧹 Chores
Expand Down
206 changes: 0 additions & 206 deletions packages/eas-cli/graphql.schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/eas-cli/src/build/__tests__/cancel-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,5 @@ function createMockBuildFragment({
},
status: BuildStatus.InQueue,
resourceClass: BuildResourceClass.AndroidMedium,
isForIosSimulator: false,
};
}
1 change: 0 additions & 1 deletion packages/eas-cli/src/build/__tests__/delete-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,5 @@ function createMockBuildFragment({
},
status: BuildStatus.InQueue,
resourceClass: BuildResourceClass.AndroidMedium,
isForIosSimulator: false,
};
}
7 changes: 4 additions & 3 deletions packages/eas-cli/src/build/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { maybeResolveVersionsAsync as maybeResolveAndroidVersionsAsync } from '.
import { BuildContext } from './context';
import { maybeResolveVersionsAsync as maybeResolveIosVersionsAsync } from './ios/version';
import { LocalBuildMode } from './local';
import { BuildDistributionType } from './types';
import Log from '../log';
import {
getUsername,
Expand All @@ -29,7 +28,10 @@ export async function collectMetadataAsync<T extends Platform>(
ctx: BuildContext<T>
): Promise<Metadata> {
const channelOrReleaseChannel = await resolveChannelOrReleaseChannelAsync(ctx);
const distribution = ctx.buildProfile.distribution ?? BuildDistributionType.STORE;
const distribution =
('simulator' in ctx.buildProfile && ctx.buildProfile.simulator
? 'simulator'
: ctx.buildProfile.distribution) ?? 'store';
const metadata: Metadata = {
trackingContext: ctx.analyticsEventProperties,
...(await maybeResolveVersionsAsync(ctx)),
Expand Down Expand Up @@ -68,7 +70,6 @@ export async function collectMetadataAsync<T extends Platform>(
requiredPackageManager: ctx.requiredPackageManager ?? undefined,
selectedImage: ctx.buildProfile.image,
customNodeVersion: ctx.buildProfile.node,
simulator: 'simulator' in ctx.buildProfile && ctx.buildProfile.simulator,
};
return sanitizeMetadata(metadata);
}
Expand Down
1 change: 0 additions & 1 deletion packages/eas-cli/src/build/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ export enum BuildStatus {
export enum BuildDistributionType {
STORE = 'store',
INTERNAL = 'internal',
/** @deprecated Use simulator flag instead */
SIMULATOR = 'simulator',
}
17 changes: 0 additions & 17 deletions packages/eas-cli/src/commands/build/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
getPaginatedQueryOptions,
} from '../../commandUtils/pagination';
import { AppPlatform, BuildStatus as GraphQLBuildStatus } from '../../graphql/generated';
import Log from '../../log';
import { RequestedPlatform } from '../../platform';
import { getDisplayNameForProjectIdAsync } from '../../project/projectUtils';
import { buildDistributionTypeToGraphQLDistributionType } from '../../utils/buildDistribution';
Expand Down Expand Up @@ -52,10 +51,6 @@ export default class BuildList extends EasCommand {
...EasPaginatedQueryFlags,
limit: getLimitFlagWithCustomValues({ defaultTo: 10, limit: BUILDS_LIMIT }),
...EasNonInteractiveAndJsonFlags,
simulator: Flags.boolean({
description:
'Filter only iOS simulator builds. Can only be used with --platform flag set to "ios"',
}),
};

static override contextDefinition = {
Expand All @@ -74,17 +69,6 @@ export default class BuildList extends EasCommand {
distribution: buildDistribution,
'non-interactive': nonInteractive,
} = flags;
if (buildDistribution === BuildDistributionType.SIMULATOR) {
Log.warn(
`Using --distribution flag with "simulator" value is deprecated - use --simulator flag instead`
);
}
if (flags.simulator && requestedPlatform !== RequestedPlatform.Ios) {
Log.error(
`The --simulator flag is only usable with --platform flag set to "ios", as it is used to filter specifically iOS simulator builds`
);
process.exit(1);
}
const {
privateProjectConfig: { projectId },
loggedIn: { graphqlClient },
Expand Down Expand Up @@ -116,7 +100,6 @@ export default class BuildList extends EasCommand {
appIdentifier: flags.appIdentifier,
buildProfile: flags.buildProfile,
gitCommitHash: flags.gitCommitHash,
simulator: flags.simulator,
},
paginatedQueryOptions,
});
Expand Down
Loading

0 comments on commit c527fe1

Please sign in to comment.