Skip to content

Commit

Permalink
Allow specifying groups option in submit command
Browse files Browse the repository at this point in the history
  • Loading branch information
khamilowicz committed Feb 7, 2025
1 parent f334bdb commit 4892814
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 1 deletion.
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

0 comments on commit 4892814

Please sign in to comment.