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

implement SetupInternalProvisioningProfile #344

Merged

Conversation

dsokal
Copy link
Contributor

@dsokal dsokal commented Apr 19, 2021

Checklist

Why

  • This PR makes it possible to set up both ad-hoc and enterprise credentials when someone is using an enterprise team but didn't set the enterpriseProvisioning property in eas.json.
  • This also adds offline validation of a distribution certificate.

How

  • I implemented the logic in SetupInternalProvisioningProfile - it's run when the user didn't specify the enterpriseProvisioning property in eas.json.
  • I removed handling of the --skip-credentials-check flag for iOS builds. The flag was necessary because we didn't have proper offline validation of the provisioning profile/distribution certificate. This PR adds the offline dist cert validation and makes it possible to get rid of the flag.

Test Plan

Added unit tests.

@github-actions
Copy link

github-actions bot commented Apr 19, 2021

Size Change: -2.79 kB (0%)

Total Size: 32.8 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 32.8 MB -2.79 kB (0%)

compressed-size-action

return await this.setupAdhocProvisioningProfile(ctx);
}
} else {
if (adhocBuildCredentials && enterpriseBuildCredentials) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's never falsy, it will be either one element list or empty list

'Which credentials would you like to set up?'
);
} else {
return await this.setupAdhocProvisioningProfile(ctx);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing Async

@dsokal dsokal force-pushed the @dsokal/implement-setup-internal-provisioning-profile branch 4 times, most recently from b844396 to 34353ab Compare April 22, 2021 10:44
@dsokal dsokal requested review from quinlanj and wkozyra95 April 22, 2021 11:01
@dsokal dsokal marked this pull request as ready for review April 22, 2021 11:01
ctx: Context,
accountName: string,
action: ActionType
): Action {
): Action<void> | Action<IosAppBuildCredentialsFragment> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
): Action<void> | Action<IosAppBuildCredentialsFragment> {
): Action<unknown> {

@@ -26,10 +26,13 @@ interface Options {
skipCredentialsCheck?: boolean;
}

export class SetupBuildCredentials implements Action {
export class SetupBuildCredentials implements Action<IosAppBuildCredentialsFragment> {
Copy link
Contributor

@wkozyra95 wkozyra95 Apr 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SetupBuildCredentials.runAsync should return sth like IosAppBuildCredentialsFragment but field shouldnt be optional

import { SetupAdhocProvisioningProfile } from './SetupAdhocProvisioningProfile';
import { SetupProvisioningProfile } from './SetupProvisioningProfile';

export class SetupInternalProvisioningProfile {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some description would be usefull here, both for what behaviour we implement, but also in what context it will be executed e.g, we assume that "enterpriseProvisioning" is not specified

@dsokal dsokal force-pushed the @dsokal/implement-setup-internal-provisioning-profile branch from ee473f3 to 9344d06 Compare April 22, 2021 14:53
@dsokal dsokal requested a review from wkozyra95 April 22, 2021 14:53
@brentvatne brentvatne merged commit e1de210 into main Apr 22, 2021
@brentvatne brentvatne deleted the @dsokal/implement-setup-internal-provisioning-profile branch April 22, 2021 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants