Skip to content
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 @@ -9,6 +9,7 @@ This is the log of notable changes to EAS CLI and related packages.
### 🎉 New features

- [eas-cli] Add `--refresh-ad-hoc-provisioning-profile` flag to refresh managed ad-hoc provisioning profiles from App Store Connect before gathering build credentials in non-interactive mode. ([#3716](https://github.com/expo/eas-cli/pull/3716) by [@sswrk](https://github.com/sswrk))
- [eas-build-job] Add optional `refreshAdHocProvisioningProfile` field to iOS build jobs. ([#3717](https://github.com/expo/eas-cli/pull/3717) by [@sswrk](https://github.com/sswrk))

### 🐛 Bug fixes

Expand Down
43 changes: 43 additions & 0 deletions packages/eas-build-job/src/__tests__/ios.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -534,4 +534,47 @@ describe('Ios.JobSchema', () => {
expect(value).toMatchObject(job);
expect(error).toBeFalsy();
});

test('accepts optional refreshAdHocProvisioningProfile', () => {
const job = {
secrets: {
buildCredentials,
},
type: Workflow.GENERIC,
platform: Platform.IOS,
projectArchive: {
type: ArchiveSourceType.URL,
url: 'http://localhost:3000',
},
projectRootDirectory: '.',
initiatingUserId: randomUUID(),
appId: randomUUID(),
refreshAdHocProvisioningProfile: true,
};

const { value, error } = Ios.JobSchema.validate(job, joiOptions);
expect(value.refreshAdHocProvisioningProfile).toBe(true);
expect(error).toBeFalsy();
});

test('does not require refreshAdHocProvisioningProfile', () => {
const job = {
secrets: {
buildCredentials,
},
type: Workflow.GENERIC,
platform: Platform.IOS,
projectArchive: {
type: ArchiveSourceType.URL,
url: 'http://localhost:3000',
},
projectRootDirectory: '.',
initiatingUserId: randomUUID(),
appId: randomUUID(),
};

const { value, error } = Ios.JobSchema.validate(job, joiOptions);
expect(value.refreshAdHocProvisioningProfile).toBeUndefined();
expect(error).toBeFalsy();
});
});
4 changes: 4 additions & 0 deletions packages/eas-build-job/src/ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ export interface Job {
appId: string;

environment?: string;

refreshAdHocProvisioningProfile?: boolean;
}

const SecretsSchema = Joi.object({
Expand Down Expand Up @@ -229,6 +231,8 @@ export const JobSchema = Joi.object({

environment: Joi.string(),

refreshAdHocProvisioningProfile: Joi.boolean(),

workflowInterpolationContext: Joi.object().custom(workflowInterpolationContext =>
StaticWorkflowInterpolationContextZ.optional().parse(workflowInterpolationContext)
),
Expand Down
Loading