Skip to content

Commit

Permalink
Use credentials types from eas-build-job where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
sjchmiela committed Jan 19, 2024
1 parent 29e4256 commit d8e8060
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ describe('credentialsJson', () => {
const result = await credentialsJsonReader.readIosCredentialsAsync('.', applicationTarget);
expect(result).toEqual({
[applicationTarget.targetName]: {
provisioningProfile: 'c29tZWJpbmFyeWNvbnRlbnQ=',
provisioningProfileBase64: 'c29tZWJpbmFyeWNvbnRlbnQ=',
distributionCertificate: {
certificateP12: 'c29tZWJpbmFyeWNvbnRlbnQy',
certificatePassword: 'certPass',
dataBase64: 'c29tZWJpbmFyeWNvbnRlbnQy',
password: 'certPass',
},
},
});
Expand Down Expand Up @@ -230,17 +230,17 @@ describe('credentialsJson', () => {
);
expect(result).toEqual({
target1: {
provisioningProfile: 'cHByb2ZpbGUtMS1zb21lYmluYXJ5Y29udGVudA==',
provisioningProfileBase64: 'cHByb2ZpbGUtMS1zb21lYmluYXJ5Y29udGVudA==',
distributionCertificate: {
certificateP12: 'Y2VydC0xLXNvbWViaW5hcnljb250ZW50',
certificatePassword: 'cert-pass-1',
dataBase64: 'Y2VydC0xLXNvbWViaW5hcnljb250ZW50',
password: 'cert-pass-1',
},
},
target2: {
provisioningProfile: 'cHByb2ZpbGUtMi1zb21lYmluYXJ5Y29udGVudA==',
provisioningProfileBase64: 'cHByb2ZpbGUtMi1zb21lYmluYXJ5Y29udGVudA==',
distributionCertificate: {
certificateP12: 'Y2VydC0yLXNvbWViaW5hcnljb250ZW50',
certificatePassword: 'cert-pass-2',
dataBase64: 'Y2VydC0yLXNvbWViaW5hcnljb250ZW50',
password: 'cert-pass-2',
},
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ enum PushNotificationSetupOption {
export default class IosCredentialsProvider {
public readonly platform = Platform.IOS;

constructor(private ctx: CredentialsContext, private options: Options) {}
constructor(
private ctx: CredentialsContext,
private options: Options
) {}

public async getCredentialsAsync(
src: CredentialsSource.LOCAL | CredentialsSource.REMOTE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ describe(IosCredentialsProvider, () => {
{
testapp: {
distributionCertificate: {
certificateP12: buildCredentials.distributionCertificate?.certificateP12,
certificatePassword: buildCredentials.distributionCertificate?.certificatePassword,
dataBase64: buildCredentials.distributionCertificate?.certificateP12,
password: buildCredentials.distributionCertificate?.certificatePassword,
},
provisioningProfile: buildCredentials.provisioningProfile?.provisioningProfile,
provisioningProfileBase64: buildCredentials.provisioningProfile?.provisioningProfile,
},
}
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Ios } from '@expo/eas-build-job';

import { IosDistributionType } from '../../../../graphql/generated';
import { AppQuery } from '../../../../graphql/queries/AppQuery';
import { findApplicationTarget } from '../../../../project/ios/target';
Expand Down

0 comments on commit d8e8060

Please sign in to comment.