Skip to content

Commit 4892814

Browse files
committed
Allow specifying groups option in submit command
1 parent f334bdb commit 4892814

File tree

10 files changed

+39
-1
lines changed

10 files changed

+39
-1
lines changed

packages/eas-cli/src/build/runBuildAndSubmit.ts

+1
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ async function prepareAndStartSubmissionAsync({
522522
exp: buildCtx.exp,
523523
vcsClient: buildCtx.vcsClient,
524524
isVerboseFastlaneEnabled: false,
525+
groups: [],
525526
specifiedProfile: selectedSubmitProfileName,
526527
});
527528

packages/eas-cli/src/commands/submit.ts

+10
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ interface RawCommandFlags {
3434
wait: boolean;
3535
'non-interactive': boolean;
3636
'verbose-fastlane': boolean;
37+
groups?: string[];
3738
}
3839

3940
interface CommandFlags {
@@ -44,6 +45,7 @@ interface CommandFlags {
4445
wait: boolean;
4546
nonInteractive: boolean;
4647
isVerboseFastlaneEnabled: boolean;
48+
groups?: string[];
4749
}
4850

4951
export default class Submit extends EasCommand {
@@ -89,6 +91,11 @@ export default class Submit extends EasCommand {
8991
default: false,
9092
description: 'Enable verbose logging for the submission process',
9193
}),
94+
groups: Flags.string({
95+
description: 'Testing groups to send the build to (iOS only).',
96+
multiple: true,
97+
char: 'g',
98+
}),
9299
'non-interactive': Flags.boolean({
93100
default: false,
94101
description: 'Run command in non-interactive mode',
@@ -140,6 +147,7 @@ export default class Submit extends EasCommand {
140147
archiveFlags: flagsWithPlatform.archiveFlags,
141148
nonInteractive: flagsWithPlatform.nonInteractive,
142149
isVerboseFastlaneEnabled: flagsWithPlatform.isVerboseFastlaneEnabled,
150+
groups: flagsWithPlatform.groups ?? [],
143151
actor,
144152
graphqlClient,
145153
analytics,
@@ -184,6 +192,7 @@ export default class Submit extends EasCommand {
184192
profile,
185193
'non-interactive': nonInteractive,
186194
'verbose-fastlane': isVerboseFastlaneEnabled,
195+
groups,
187196
...archiveFlags
188197
} = flags;
189198

@@ -205,6 +214,7 @@ export default class Submit extends EasCommand {
205214
profile,
206215
nonInteractive,
207216
isVerboseFastlaneEnabled,
217+
groups,
208218
};
209219
}
210220

packages/eas-cli/src/commands/submit/internal.ts

+1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export default class SubmitInternal extends EasCommand {
8989
},
9090
nonInteractive: true,
9191
isVerboseFastlaneEnabled: false,
92+
groups: [],
9293
actor,
9394
graphqlClient,
9495
analytics,

packages/eas-cli/src/graphql/generated.ts

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/eas-cli/src/submit/android/__tests__/AndroidSubmitCommand-test.ts

+7
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ describe(AndroidSubmitCommand, () => {
124124
},
125125
nonInteractive: true,
126126
isVerboseFastlaneEnabled: false,
127+
groups: [],
127128
actor: mockJester,
128129
graphqlClient,
129130
analytics,
@@ -163,6 +164,7 @@ describe(AndroidSubmitCommand, () => {
163164
},
164165
nonInteractive: false,
165166
isVerboseFastlaneEnabled: false,
167+
groups: [],
166168
actor: mockJester,
167169
graphqlClient,
168170
analytics,
@@ -210,6 +212,7 @@ describe(AndroidSubmitCommand, () => {
210212
},
211213
nonInteractive: false,
212214
isVerboseFastlaneEnabled: false,
215+
groups: [],
213216
actor: mockJester,
214217
graphqlClient,
215218
analytics,
@@ -260,6 +263,7 @@ describe(AndroidSubmitCommand, () => {
260263
},
261264
nonInteractive: false,
262265
isVerboseFastlaneEnabled: false,
266+
groups: [],
263267
actor: mockJester,
264268
graphqlClient,
265269
analytics,
@@ -325,6 +329,7 @@ describe(AndroidSubmitCommand, () => {
325329
},
326330
nonInteractive: false,
327331
isVerboseFastlaneEnabled: false,
332+
groups: [],
328333
actor: mockJester,
329334
graphqlClient,
330335
analytics,
@@ -388,6 +393,7 @@ describe(AndroidSubmitCommand, () => {
388393
},
389394
nonInteractive: false,
390395
isVerboseFastlaneEnabled: false,
396+
groups: [],
391397
actor: mockJester,
392398
graphqlClient,
393399
analytics,
@@ -458,6 +464,7 @@ describe(AndroidSubmitCommand, () => {
458464
},
459465
nonInteractive: false,
460466
isVerboseFastlaneEnabled: false,
467+
groups: [],
461468
actor: mockJester,
462469
graphqlClient,
463470
analytics,

packages/eas-cli/src/submit/android/__tests__/ServiceAccountSource-test.ts

+3
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ describe(getServiceAccountKeyResultAsync, () => {
157157
},
158158
nonInteractive: true,
159159
isVerboseFastlaneEnabled: false,
160+
groups: [],
160161
actor: mockJester,
161162
graphqlClient,
162163
analytics,
@@ -200,6 +201,7 @@ describe(getServiceAccountKeyResultAsync, () => {
200201
},
201202
nonInteractive: true,
202203
isVerboseFastlaneEnabled: false,
204+
groups: [],
203205
actor: mockJester,
204206
graphqlClient,
205207
analytics,
@@ -239,6 +241,7 @@ describe(getServiceAccountKeyResultAsync, () => {
239241
},
240242
nonInteractive: true,
241243
isVerboseFastlaneEnabled: false,
244+
groups: [],
242245
actor: mockJester,
243246
graphqlClient,
244247
analytics,

packages/eas-cli/src/submit/context.ts

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export interface SubmissionContext<T extends Platform> {
2222
exp: ExpoConfig;
2323
nonInteractive: boolean;
2424
isVerboseFastlaneEnabled: boolean;
25+
groups: string[];
2526
platform: T;
2627
profile: SubmitProfile<T>;
2728
projectDir: string;
@@ -48,6 +49,7 @@ export async function createSubmissionContextAsync<T extends Platform>(params: {
4849
env?: Record<string, string>;
4950
nonInteractive: boolean;
5051
isVerboseFastlaneEnabled: boolean;
52+
groups: string[];
5153
platform: T;
5254
profile: SubmitProfile<T>;
5355
projectDir: string;

packages/eas-cli/src/submit/ios/IosSubmitter.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,12 @@ export default class IosSubmitter extends BaseSubmitter<
125125
): IosSubmissionConfigInput {
126126
const { appSpecificPassword, ascApiKeyResult } = credentials;
127127
const { appleIdUsername, ascAppIdentifier } = options;
128-
const { isVerboseFastlaneEnabled } = this.ctx;
128+
const { isVerboseFastlaneEnabled, groups } = this.ctx;
129129
return {
130130
ascAppIdentifier,
131131
appleIdUsername,
132132
isVerboseFastlaneEnabled,
133+
groups,
133134
...(appSpecificPassword ? this.formatAppSpecificPassword(appSpecificPassword) : null),
134135
...(ascApiKeyResult?.result ? this.formatAscApiKeyResult(ascApiKeyResult.result) : null),
135136
};

packages/eas-cli/src/submit/ios/__tests__/AscApiKeySource-test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ async function getIosSubmissionContextAsync(): Promise<SubmissionContext<Platfor
5858
},
5959
nonInteractive: true,
6060
isVerboseFastlaneEnabled: false,
61+
groups: [],
6162
actor: mockJester,
6263
graphqlClient,
6364
analytics,
@@ -251,6 +252,7 @@ describe(getAscApiKeyResultAsync, () => {
251252
},
252253
nonInteractive: true,
253254
isVerboseFastlaneEnabled: false,
255+
groups: [],
254256
actor: mockJester,
255257
graphqlClient,
256258
analytics,

packages/eas-cli/src/submit/ios/__tests__/IosSubmitCommand-test.ts

+10
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ describe(IosSubmitCommand, () => {
101101
},
102102
nonInteractive: false,
103103
isVerboseFastlaneEnabled: false,
104+
groups: [],
104105
actor: mockJester,
105106
graphqlClient,
106107
analytics,
@@ -136,6 +137,7 @@ describe(IosSubmitCommand, () => {
136137
},
137138
nonInteractive: true,
138139
isVerboseFastlaneEnabled: false,
140+
groups: [],
139141
actor: mockJester,
140142
graphqlClient,
141143
analytics,
@@ -174,6 +176,7 @@ describe(IosSubmitCommand, () => {
174176
},
175177
nonInteractive: false,
176178
isVerboseFastlaneEnabled: false,
179+
groups: ['Test'],
177180
actor: mockJester,
178181
graphqlClient,
179182
analytics,
@@ -193,6 +196,7 @@ describe(IosSubmitCommand, () => {
193196
appleAppSpecificPassword: 'abcd-abcd-abcd-abcd',
194197
ascAppIdentifier: '12345678',
195198
isVerboseFastlaneEnabled: false,
199+
groups: ['Test'],
196200
},
197201
submittedBuildId: undefined,
198202
});
@@ -240,6 +244,7 @@ describe(IosSubmitCommand, () => {
240244
},
241245
nonInteractive: false,
242246
isVerboseFastlaneEnabled: false,
247+
groups: [],
243248
actor: mockJester,
244249
graphqlClient,
245250
analytics,
@@ -259,6 +264,7 @@ describe(IosSubmitCommand, () => {
259264
appleAppSpecificPassword: 'abcd-abcd-abcd-abcd',
260265
ascAppIdentifier: '87654321',
261266
isVerboseFastlaneEnabled: false,
267+
groups: [],
262268
},
263269
archiveSource: undefined,
264270
});
@@ -300,6 +306,7 @@ describe(IosSubmitCommand, () => {
300306
},
301307
nonInteractive: false,
302308
isVerboseFastlaneEnabled: false,
309+
groups: [],
303310
actor: mockJester,
304311
graphqlClient,
305312
analytics,
@@ -319,6 +326,7 @@ describe(IosSubmitCommand, () => {
319326
appleAppSpecificPassword: 'abcd-abcd-abcd-abcd',
320327
ascAppIdentifier: '12345678',
321328
isVerboseFastlaneEnabled: false,
329+
groups: [],
322330
},
323331
archiveSource: undefined,
324332
});
@@ -365,6 +373,7 @@ describe(IosSubmitCommand, () => {
365373
},
366374
nonInteractive: false,
367375
isVerboseFastlaneEnabled: false,
376+
groups: [],
368377
actor: mockJester,
369378
graphqlClient,
370379
analytics,
@@ -385,6 +394,7 @@ describe(IosSubmitCommand, () => {
385394
appleAppSpecificPassword: 'abcd-abcd-abcd-abcd',
386395
ascAppIdentifier: '12345678',
387396
isVerboseFastlaneEnabled: false,
397+
groups: [],
388398
},
389399
archiveSource: undefined,
390400
});

0 commit comments

Comments
 (0)