Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying groups option in submit command #2891

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1635,6 +1635,7 @@ This is the log of notable changes to EAS CLI and related packages.
- Add `eas build:run` command which runs iOS simulator builds from the CLI. ([#1447](https://github.com/expo/eas-cli/pull/1447) by [@szdziedzic](https://github.com/szdziedzic))
- Add feature gate support. ([#1475](https://github.com/expo/eas-cli/pull/1475) by [@wschurman](https://github.com/wschurman))
- Warn about outdated build deployment when configuring EAS Update. ([#1467](https://github.com/expo/eas-cli/pull/1467) by [@fiberjw](https://github.com/fiberjw))
- Add groups option to eas submit command. ([#2891](https://github.com/expo/eas-cli/pull/2891) by [@khamilowicz](https://github.com/khamilowicz))

### 🧹 Chores

Expand Down
1 change: 1 addition & 0 deletions packages/eas-cli/src/build/runBuildAndSubmit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ async function prepareAndStartSubmissionAsync({
exp: buildCtx.exp,
vcsClient: buildCtx.vcsClient,
isVerboseFastlaneEnabled: false,
groups: [],
specifiedProfile: selectedSubmitProfileName,
});

Expand Down
10 changes: 10 additions & 0 deletions packages/eas-cli/src/commands/submit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ interface RawCommandFlags {
wait: boolean;
'non-interactive': boolean;
'verbose-fastlane': boolean;
groups?: string[];
}

interface CommandFlags {
Expand All @@ -44,6 +45,7 @@ interface CommandFlags {
wait: boolean;
nonInteractive: boolean;
isVerboseFastlaneEnabled: boolean;
groups?: string[];
}

export default class Submit extends EasCommand {
Expand Down Expand Up @@ -89,6 +91,11 @@ export default class Submit extends EasCommand {
default: false,
description: 'Enable verbose logging for the submission process',
}),
groups: Flags.string({
description: 'Testing groups to send the build to (iOS only).',
multiple: true,
char: 'g',
}),
'non-interactive': Flags.boolean({
default: false,
description: 'Run command in non-interactive mode',
Expand Down Expand Up @@ -140,6 +147,7 @@ export default class Submit extends EasCommand {
archiveFlags: flagsWithPlatform.archiveFlags,
nonInteractive: flagsWithPlatform.nonInteractive,
isVerboseFastlaneEnabled: flagsWithPlatform.isVerboseFastlaneEnabled,
groups: flagsWithPlatform.groups ?? [],
actor,
graphqlClient,
analytics,
Expand Down Expand Up @@ -184,6 +192,7 @@ export default class Submit extends EasCommand {
profile,
'non-interactive': nonInteractive,
'verbose-fastlane': isVerboseFastlaneEnabled,
groups,
...archiveFlags
} = flags;

Expand All @@ -205,6 +214,7 @@ export default class Submit extends EasCommand {
profile,
nonInteractive,
isVerboseFastlaneEnabled,
groups,
};
}

Expand Down
1 change: 1 addition & 0 deletions packages/eas-cli/src/commands/submit/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export default class SubmitInternal extends EasCommand {
},
nonInteractive: true,
isVerboseFastlaneEnabled: false,
groups: [],
actor,
graphqlClient,
analytics,
Expand Down
1 change: 1 addition & 0 deletions packages/eas-cli/src/graphql/generated.ts

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

Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ describe(AndroidSubmitCommand, () => {
},
nonInteractive: true,
isVerboseFastlaneEnabled: false,
groups: [],
actor: mockJester,
graphqlClient,
analytics,
Expand Down Expand Up @@ -163,6 +164,7 @@ describe(AndroidSubmitCommand, () => {
},
nonInteractive: false,
isVerboseFastlaneEnabled: false,
groups: [],
actor: mockJester,
graphqlClient,
analytics,
Expand Down Expand Up @@ -210,6 +212,7 @@ describe(AndroidSubmitCommand, () => {
},
nonInteractive: false,
isVerboseFastlaneEnabled: false,
groups: [],
actor: mockJester,
graphqlClient,
analytics,
Expand Down Expand Up @@ -260,6 +263,7 @@ describe(AndroidSubmitCommand, () => {
},
nonInteractive: false,
isVerboseFastlaneEnabled: false,
groups: [],
actor: mockJester,
graphqlClient,
analytics,
Expand Down Expand Up @@ -325,6 +329,7 @@ describe(AndroidSubmitCommand, () => {
},
nonInteractive: false,
isVerboseFastlaneEnabled: false,
groups: [],
actor: mockJester,
graphqlClient,
analytics,
Expand Down Expand Up @@ -388,6 +393,7 @@ describe(AndroidSubmitCommand, () => {
},
nonInteractive: false,
isVerboseFastlaneEnabled: false,
groups: [],
actor: mockJester,
graphqlClient,
analytics,
Expand Down Expand Up @@ -458,6 +464,7 @@ describe(AndroidSubmitCommand, () => {
},
nonInteractive: false,
isVerboseFastlaneEnabled: false,
groups: [],
actor: mockJester,
graphqlClient,
analytics,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ describe(getServiceAccountKeyResultAsync, () => {
},
nonInteractive: true,
isVerboseFastlaneEnabled: false,
groups: [],
actor: mockJester,
graphqlClient,
analytics,
Expand Down Expand Up @@ -200,6 +201,7 @@ describe(getServiceAccountKeyResultAsync, () => {
},
nonInteractive: true,
isVerboseFastlaneEnabled: false,
groups: [],
actor: mockJester,
graphqlClient,
analytics,
Expand Down Expand Up @@ -239,6 +241,7 @@ describe(getServiceAccountKeyResultAsync, () => {
},
nonInteractive: true,
isVerboseFastlaneEnabled: false,
groups: [],
actor: mockJester,
graphqlClient,
analytics,
Expand Down
2 changes: 2 additions & 0 deletions packages/eas-cli/src/submit/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface SubmissionContext<T extends Platform> {
exp: ExpoConfig;
nonInteractive: boolean;
isVerboseFastlaneEnabled: boolean;
groups: string[];
platform: T;
profile: SubmitProfile<T>;
projectDir: string;
Expand All @@ -48,6 +49,7 @@ export async function createSubmissionContextAsync<T extends Platform>(params: {
env?: Record<string, string>;
nonInteractive: boolean;
isVerboseFastlaneEnabled: boolean;
groups: string[];
platform: T;
profile: SubmitProfile<T>;
projectDir: string;
Expand Down
3 changes: 2 additions & 1 deletion packages/eas-cli/src/submit/ios/IosSubmitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,12 @@ export default class IosSubmitter extends BaseSubmitter<
): IosSubmissionConfigInput {
const { appSpecificPassword, ascApiKeyResult } = credentials;
const { appleIdUsername, ascAppIdentifier } = options;
const { isVerboseFastlaneEnabled } = this.ctx;
const { isVerboseFastlaneEnabled, groups } = this.ctx;
return {
ascAppIdentifier,
appleIdUsername,
isVerboseFastlaneEnabled,
groups,
...(appSpecificPassword ? this.formatAppSpecificPassword(appSpecificPassword) : null),
...(ascApiKeyResult?.result ? this.formatAscApiKeyResult(ascApiKeyResult.result) : null),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ async function getIosSubmissionContextAsync(): Promise<SubmissionContext<Platfor
},
nonInteractive: true,
isVerboseFastlaneEnabled: false,
groups: [],
actor: mockJester,
graphqlClient,
analytics,
Expand Down Expand Up @@ -251,6 +252,7 @@ describe(getAscApiKeyResultAsync, () => {
},
nonInteractive: true,
isVerboseFastlaneEnabled: false,
groups: [],
actor: mockJester,
graphqlClient,
analytics,
Expand Down
10 changes: 10 additions & 0 deletions packages/eas-cli/src/submit/ios/__tests__/IosSubmitCommand-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ describe(IosSubmitCommand, () => {
},
nonInteractive: false,
isVerboseFastlaneEnabled: false,
groups: [],
actor: mockJester,
graphqlClient,
analytics,
Expand Down Expand Up @@ -136,6 +137,7 @@ describe(IosSubmitCommand, () => {
},
nonInteractive: true,
isVerboseFastlaneEnabled: false,
groups: [],
actor: mockJester,
graphqlClient,
analytics,
Expand Down Expand Up @@ -174,6 +176,7 @@ describe(IosSubmitCommand, () => {
},
nonInteractive: false,
isVerboseFastlaneEnabled: false,
groups: ['Test'],
actor: mockJester,
graphqlClient,
analytics,
Expand All @@ -193,6 +196,7 @@ describe(IosSubmitCommand, () => {
appleAppSpecificPassword: 'abcd-abcd-abcd-abcd',
ascAppIdentifier: '12345678',
isVerboseFastlaneEnabled: false,
groups: ['Test'],
},
submittedBuildId: undefined,
});
Expand Down Expand Up @@ -240,6 +244,7 @@ describe(IosSubmitCommand, () => {
},
nonInteractive: false,
isVerboseFastlaneEnabled: false,
groups: [],
actor: mockJester,
graphqlClient,
analytics,
Expand All @@ -259,6 +264,7 @@ describe(IosSubmitCommand, () => {
appleAppSpecificPassword: 'abcd-abcd-abcd-abcd',
ascAppIdentifier: '87654321',
isVerboseFastlaneEnabled: false,
groups: [],
},
archiveSource: undefined,
});
Expand Down Expand Up @@ -300,6 +306,7 @@ describe(IosSubmitCommand, () => {
},
nonInteractive: false,
isVerboseFastlaneEnabled: false,
groups: [],
actor: mockJester,
graphqlClient,
analytics,
Expand All @@ -319,6 +326,7 @@ describe(IosSubmitCommand, () => {
appleAppSpecificPassword: 'abcd-abcd-abcd-abcd',
ascAppIdentifier: '12345678',
isVerboseFastlaneEnabled: false,
groups: [],
},
archiveSource: undefined,
});
Expand Down Expand Up @@ -365,6 +373,7 @@ describe(IosSubmitCommand, () => {
},
nonInteractive: false,
isVerboseFastlaneEnabled: false,
groups: [],
actor: mockJester,
graphqlClient,
analytics,
Expand All @@ -385,6 +394,7 @@ describe(IosSubmitCommand, () => {
appleAppSpecificPassword: 'abcd-abcd-abcd-abcd',
ascAppIdentifier: '12345678',
isVerboseFastlaneEnabled: false,
groups: [],
},
archiveSource: undefined,
});
Expand Down