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

[ENG-11090][eas-cli] prompt users if they want to continue if provisioning the devices fails #2181

Merged
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 @@ -13,6 +13,7 @@ This is the log of notable changes to EAS CLI and related packages.
### 🧹 Chores

- Remove "bare"-specific **eas.json** template. ([#2179](https://github.com/expo/eas-cli/pull/2179) by [@sjchmiela](https://github.com/sjchmiela))
- Prompt users if they want to continue if EAS CLI fails to provision the devices. ([#2181](https://github.com/expo/eas-cli/pull/2181) by [@szdziedzic](https://github.com/szdziedzic))

## [6.0.0](https://github.com/expo/eas-cli/releases/tag/v6.0.0) - 2024-01-12

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ProfileType } from '@expo/apple-utils';
import { Errors } from '@oclif/core';
import assert from 'assert';
import chalk from 'chalk';
import nullthrows from 'nullthrows';
Expand All @@ -15,7 +16,12 @@ import {
} from '../../../graphql/generated';
import Log from '../../../log';
import { getApplePlatformFromTarget } from '../../../project/ios/target';
import { confirmAsync, pressAnyKeyToContinueAsync, promptAsync } from '../../../prompts';
import {
confirmAsync,
pressAnyKeyToContinueAsync,
promptAsync,
selectAsync,
} from '../../../prompts';
import differenceBy from '../../../utils/expodash/differenceBy';
import { CredentialsContext } from '../../context';
import { MissingCredentialsNonInteractiveError } from '../../errors';
Expand Down Expand Up @@ -181,6 +187,22 @@ export class SetUpAdhocProvisioningProfile {
Log.log(
'Most commonly devices fail to to be provisioned while they are still being processed by Apple, which can take up to 24-72 hours. Check your Apple Developer Portal page at https://developer.apple.com/account/resources/devices/list, the devices in "Processing" status cannot be provisioned yet'
);
const shouldContinue = await selectAsync(
'Do you want to continue without provisioning these devices?',
[
{
title: 'Yes',
value: true,
},
{
title: 'No (EAS CLI will exit)',
value: false,
},
]
);
if (!shouldContinue) {
Errors.exit(1);
}
}

// 7. Create (or update) app build credentials
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
} from '../../../../graphql/generated';
import Log from '../../../../log';
import { getApplePlatformFromTarget } from '../../../../project/ios/target';
import { selectAsync } from '../../../../prompts';
import { Actor } from '../../../../user/User';
import { Client } from '../../../../vcs/vcs';
import { CredentialsContext, CredentialsContextProjectInfo } from '../../../context';
Expand All @@ -34,6 +35,7 @@ jest.mock('../DeviceUtils', () => {
};
});
jest.mock('../../../../project/ios/target');
jest.mock('../../../../prompts');

describe(doUDIDsMatch, () => {
it('return false if UDIDs do not match', () => {
Expand Down Expand Up @@ -67,6 +69,7 @@ describe('runWithDistributionCertificateAsync', () => {
developerPortalIdentifier: 'provisioningProfileId',
},
} as IosAppBuildCredentialsFragment);
jest.mocked(selectAsync).mockImplementation(async () => true);
ctx.ios.updateProvisioningProfileAsync = jest.fn().mockResolvedValue({
appleTeam: {},
appleDevices: [{ identifier: 'id1' }],
Expand Down
Loading