@expo/build-tools 18.5.0 → 18.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ios/configure.js +4 -0
- package/dist/ios/credentials/provisioningProfile.d.ts +1 -0
- package/dist/ios/credentials/provisioningProfile.js +5 -0
- package/dist/steps/functionGroups/build.js +115 -34
- package/dist/steps/utils/ios/configure.js +4 -0
- package/dist/steps/utils/ios/credentials/provisioningProfile.d.ts +1 -0
- package/dist/steps/utils/ios/credentials/provisioningProfile.js +5 -0
- package/dist/utils/project.d.ts +2 -1
- package/dist/utils/project.js +29 -2
- package/package.json +4 -4
package/dist/ios/configure.js
CHANGED
|
@@ -10,6 +10,7 @@ const plist_1 = __importDefault(require("@expo/plist"));
|
|
|
10
10
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
11
11
|
const uniq_1 = __importDefault(require("lodash/uniq"));
|
|
12
12
|
const path_1 = __importDefault(require("path"));
|
|
13
|
+
const provisioningProfile_1 = require("./credentials/provisioningProfile");
|
|
13
14
|
async function configureXcodeProject(ctx, { credentials, buildConfiguration, }) {
|
|
14
15
|
ctx.logger.info('Configuring Xcode project');
|
|
15
16
|
await configureCredentialsAsync(ctx, {
|
|
@@ -35,6 +36,9 @@ async function configureCredentialsAsync(ctx, { credentials, buildConfiguration,
|
|
|
35
36
|
profileName: profile.name,
|
|
36
37
|
appleTeamId: profile.teamId,
|
|
37
38
|
buildConfiguration,
|
|
39
|
+
...(credentials.distributionType === provisioningProfile_1.DistributionType.DEVELOPMENT && {
|
|
40
|
+
codeSignIdentity: profile.certificateCommonName,
|
|
41
|
+
}),
|
|
38
42
|
});
|
|
39
43
|
}
|
|
40
44
|
}
|
|
@@ -14,6 +14,7 @@ export interface ProvisioningProfileData {
|
|
|
14
14
|
export declare enum DistributionType {
|
|
15
15
|
AD_HOC = "ad-hoc",
|
|
16
16
|
APP_STORE = "app-store",
|
|
17
|
+
DEVELOPMENT = "development",
|
|
17
18
|
ENTERPRISE = "enterprise"
|
|
18
19
|
}
|
|
19
20
|
export default class ProvisioningProfile<TJob extends Ios.Job> {
|
|
@@ -16,6 +16,7 @@ var DistributionType;
|
|
|
16
16
|
(function (DistributionType) {
|
|
17
17
|
DistributionType["AD_HOC"] = "ad-hoc";
|
|
18
18
|
DistributionType["APP_STORE"] = "app-store";
|
|
19
|
+
DistributionType["DEVELOPMENT"] = "development";
|
|
19
20
|
DistributionType["ENTERPRISE"] = "enterprise";
|
|
20
21
|
})(DistributionType || (exports.DistributionType = DistributionType = {}));
|
|
21
22
|
const PROVISIONING_PROFILES_DIRECTORY = path_1.default.join(os_1.default.homedir(), 'Library/MobileDevice/Provisioning Profiles');
|
|
@@ -107,6 +108,10 @@ class ProvisioningProfile {
|
|
|
107
108
|
return DistributionType.ENTERPRISE;
|
|
108
109
|
}
|
|
109
110
|
else if (plistData.ProvisionedDevices) {
|
|
111
|
+
const entitlements = plistData.Entitlements;
|
|
112
|
+
if (entitlements?.['get-task-allow']) {
|
|
113
|
+
return DistributionType.DEVELOPMENT;
|
|
114
|
+
}
|
|
110
115
|
return DistributionType.AD_HOC;
|
|
111
116
|
}
|
|
112
117
|
else {
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.createEasBuildBuildFunctionGroup = createEasBuildBuildFunctionGroup;
|
|
4
7
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
5
8
|
const steps_1 = require("@expo/steps");
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
6
10
|
const eagerBundle_1 = require("../../common/eagerBundle");
|
|
7
11
|
const calculateEASUpdateRuntimeVersion_1 = require("../functions/calculateEASUpdateRuntimeVersion");
|
|
8
12
|
const checkout_1 = require("../functions/checkout");
|
|
@@ -28,18 +32,30 @@ function createEasBuildBuildFunctionGroup(buildToolsContext) {
|
|
|
28
32
|
return new steps_1.BuildFunctionGroup({
|
|
29
33
|
namespace: 'eas',
|
|
30
34
|
id: 'build',
|
|
31
|
-
|
|
35
|
+
inputProviders: [
|
|
36
|
+
steps_1.BuildStepInput.createProvider({
|
|
37
|
+
id: 'working_directory',
|
|
38
|
+
required: false,
|
|
39
|
+
allowedValueTypeName: steps_1.BuildStepInputValueTypeName.STRING,
|
|
40
|
+
}),
|
|
41
|
+
],
|
|
42
|
+
createBuildStepsFromFunctionGroupCall: (globalCtx, { inputs }) => {
|
|
43
|
+
const workingDirectory = inputs.working_directory?.getValue({
|
|
44
|
+
interpolationContext: globalCtx.getInterpolationContext(),
|
|
45
|
+
});
|
|
32
46
|
if (buildToolsContext.job.platform === eas_build_job_1.Platform.IOS) {
|
|
33
47
|
if (buildToolsContext.job.simulator) {
|
|
34
48
|
return createStepsForIosSimulatorBuild({
|
|
35
49
|
globalCtx,
|
|
36
50
|
buildToolsContext,
|
|
51
|
+
workingDirectory,
|
|
37
52
|
});
|
|
38
53
|
}
|
|
39
54
|
else {
|
|
40
55
|
return createStepsForIosBuildWithCredentials({
|
|
41
56
|
globalCtx,
|
|
42
57
|
buildToolsContext,
|
|
58
|
+
workingDirectory,
|
|
43
59
|
});
|
|
44
60
|
}
|
|
45
61
|
}
|
|
@@ -48,12 +64,14 @@ function createEasBuildBuildFunctionGroup(buildToolsContext) {
|
|
|
48
64
|
return createStepsForAndroidBuildWithoutCredentials({
|
|
49
65
|
globalCtx,
|
|
50
66
|
buildToolsContext,
|
|
67
|
+
workingDirectory,
|
|
51
68
|
});
|
|
52
69
|
}
|
|
53
70
|
else {
|
|
54
71
|
return createStepsForAndroidBuildWithCredentials({
|
|
55
72
|
globalCtx,
|
|
56
73
|
buildToolsContext,
|
|
74
|
+
workingDirectory,
|
|
57
75
|
});
|
|
58
76
|
}
|
|
59
77
|
}
|
|
@@ -61,14 +79,16 @@ function createEasBuildBuildFunctionGroup(buildToolsContext) {
|
|
|
61
79
|
},
|
|
62
80
|
});
|
|
63
81
|
}
|
|
64
|
-
function createStepsForIosSimulatorBuild({ globalCtx, buildToolsContext, }) {
|
|
82
|
+
function createStepsForIosSimulatorBuild({ globalCtx, buildToolsContext, workingDirectory, }) {
|
|
65
83
|
const calculateEASUpdateRuntimeVersion = (0, calculateEASUpdateRuntimeVersion_1.calculateEASUpdateRuntimeVersionFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
66
84
|
id: 'calculate_eas_update_runtime_version',
|
|
85
|
+
workingDirectory,
|
|
67
86
|
});
|
|
68
87
|
const installPods = (0, installPods_1.createInstallPodsBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
69
|
-
workingDirectory: './ios',
|
|
88
|
+
workingDirectory: workingDirectory ? path_1.default.join(workingDirectory, './ios') : './ios',
|
|
70
89
|
});
|
|
71
90
|
const configureEASUpdate = (0, configureEASUpdateIfInstalled_1.configureEASUpdateIfInstalledFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
91
|
+
workingDirectory,
|
|
72
92
|
callInputs: {
|
|
73
93
|
throw_if_not_configured: false,
|
|
74
94
|
resolved_eas_update_runtime_version: '${ steps.calculate_eas_update_runtime_version.resolved_eas_update_runtime_version }',
|
|
@@ -76,92 +96,119 @@ function createStepsForIosSimulatorBuild({ globalCtx, buildToolsContext, }) {
|
|
|
76
96
|
});
|
|
77
97
|
const runFastlane = (0, runFastlane_1.runFastlaneFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
78
98
|
id: 'run_fastlane',
|
|
99
|
+
workingDirectory,
|
|
79
100
|
callInputs: {
|
|
80
101
|
resolved_eas_update_runtime_version: '${ steps.calculate_eas_update_runtime_version.resolved_eas_update_runtime_version }',
|
|
81
102
|
},
|
|
82
103
|
});
|
|
83
104
|
return [
|
|
84
105
|
(0, checkout_1.createCheckoutBuildFunction)().createBuildStepFromFunctionCall(globalCtx),
|
|
85
|
-
(0, useNpmToken_1.createSetUpNpmrcBuildFunction)().createBuildStepFromFunctionCall(globalCtx
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
(0,
|
|
106
|
+
(0, useNpmToken_1.createSetUpNpmrcBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
107
|
+
workingDirectory,
|
|
108
|
+
}),
|
|
109
|
+
(0, installNodeModules_1.createInstallNodeModulesBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
110
|
+
workingDirectory,
|
|
111
|
+
}),
|
|
112
|
+
(0, resolveBuildConfig_1.createResolveBuildConfigBuildFunction)(buildToolsContext).createBuildStepFromFunctionCall(globalCtx, { workingDirectory }),
|
|
113
|
+
(0, prebuild_1.createPrebuildBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
114
|
+
workingDirectory,
|
|
115
|
+
}),
|
|
89
116
|
calculateEASUpdateRuntimeVersion,
|
|
90
117
|
installPods,
|
|
91
118
|
configureEASUpdate,
|
|
92
119
|
...((0, eagerBundle_1.shouldUseEagerBundle)(globalCtx.staticContext.metadata)
|
|
93
120
|
? [
|
|
94
121
|
(0, eagerBundle_2.eagerBundleBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
122
|
+
workingDirectory,
|
|
95
123
|
callInputs: {
|
|
96
124
|
resolved_eas_update_runtime_version: '${ steps.calculate_eas_update_runtime_version.resolved_eas_update_runtime_version }',
|
|
97
125
|
},
|
|
98
126
|
}),
|
|
99
127
|
]
|
|
100
128
|
: []),
|
|
101
|
-
(0, generateGymfileFromTemplate_1.generateGymfileFromTemplateFunction)().createBuildStepFromFunctionCall(globalCtx
|
|
129
|
+
(0, generateGymfileFromTemplate_1.generateGymfileFromTemplateFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
130
|
+
workingDirectory,
|
|
131
|
+
}),
|
|
102
132
|
runFastlane,
|
|
103
|
-
(0, findAndUploadBuildArtifacts_1.createFindAndUploadBuildArtifactsBuildFunction)(buildToolsContext).createBuildStepFromFunctionCall(globalCtx),
|
|
133
|
+
(0, findAndUploadBuildArtifacts_1.createFindAndUploadBuildArtifactsBuildFunction)(buildToolsContext).createBuildStepFromFunctionCall(globalCtx, { workingDirectory }),
|
|
104
134
|
];
|
|
105
135
|
}
|
|
106
|
-
function createStepsForIosBuildWithCredentials({ globalCtx, buildToolsContext, }) {
|
|
136
|
+
function createStepsForIosBuildWithCredentials({ globalCtx, buildToolsContext, workingDirectory, }) {
|
|
107
137
|
const evictUsedBefore = new Date();
|
|
108
138
|
const resolveAppleTeamIdFromCredentials = (0, resolveAppleTeamIdFromCredentials_1.resolveAppleTeamIdFromCredentialsFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
109
139
|
id: 'resolve_apple_team_id_from_credentials',
|
|
140
|
+
workingDirectory,
|
|
110
141
|
});
|
|
111
142
|
const calculateEASUpdateRuntimeVersion = (0, calculateEASUpdateRuntimeVersion_1.calculateEASUpdateRuntimeVersionFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
112
143
|
id: 'calculate_eas_update_runtime_version',
|
|
144
|
+
workingDirectory,
|
|
113
145
|
});
|
|
114
146
|
const prebuildStep = (0, prebuild_1.createPrebuildBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
147
|
+
workingDirectory,
|
|
115
148
|
callInputs: {
|
|
116
149
|
apple_team_id: '${ steps.resolve_apple_team_id_from_credentials.apple_team_id }',
|
|
117
150
|
},
|
|
118
151
|
});
|
|
119
152
|
const restoreCache = (0, restoreBuildCache_1.createRestoreBuildCacheFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
153
|
+
workingDirectory,
|
|
120
154
|
callInputs: {
|
|
121
155
|
platform: eas_build_job_1.Platform.IOS,
|
|
122
156
|
},
|
|
123
157
|
});
|
|
124
158
|
const installPods = (0, installPods_1.createInstallPodsBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
125
|
-
workingDirectory: './ios',
|
|
159
|
+
workingDirectory: workingDirectory ? path_1.default.join(workingDirectory, './ios') : './ios',
|
|
126
160
|
});
|
|
127
161
|
const configureEASUpdate = (0, configureEASUpdateIfInstalled_1.configureEASUpdateIfInstalledFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
162
|
+
workingDirectory,
|
|
128
163
|
callInputs: {
|
|
129
164
|
throw_if_not_configured: false,
|
|
130
165
|
resolved_eas_update_runtime_version: '${ steps.calculate_eas_update_runtime_version.resolved_eas_update_runtime_version }',
|
|
131
166
|
},
|
|
132
167
|
});
|
|
133
168
|
const generateGymfile = (0, generateGymfileFromTemplate_1.generateGymfileFromTemplateFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
169
|
+
workingDirectory,
|
|
134
170
|
callInputs: {
|
|
135
171
|
credentials: '${ eas.job.secrets.buildCredentials }',
|
|
136
172
|
},
|
|
137
173
|
});
|
|
138
174
|
const runFastlane = (0, runFastlane_1.runFastlaneFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
139
175
|
id: 'run_fastlane',
|
|
176
|
+
workingDirectory,
|
|
140
177
|
callInputs: {
|
|
141
178
|
resolved_eas_update_runtime_version: '${ steps.calculate_eas_update_runtime_version.resolved_eas_update_runtime_version }',
|
|
142
179
|
},
|
|
143
180
|
});
|
|
144
181
|
const saveCache = (0, saveBuildCache_1.createSaveBuildCacheFunction)(evictUsedBefore).createBuildStepFromFunctionCall(globalCtx, {
|
|
182
|
+
workingDirectory,
|
|
145
183
|
callInputs: {
|
|
146
184
|
platform: eas_build_job_1.Platform.IOS,
|
|
147
185
|
},
|
|
148
186
|
});
|
|
149
187
|
return [
|
|
150
188
|
(0, checkout_1.createCheckoutBuildFunction)().createBuildStepFromFunctionCall(globalCtx),
|
|
151
|
-
(0, useNpmToken_1.createSetUpNpmrcBuildFunction)().createBuildStepFromFunctionCall(globalCtx
|
|
152
|
-
|
|
153
|
-
|
|
189
|
+
(0, useNpmToken_1.createSetUpNpmrcBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
190
|
+
workingDirectory,
|
|
191
|
+
}),
|
|
192
|
+
(0, installNodeModules_1.createInstallNodeModulesBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
193
|
+
workingDirectory,
|
|
194
|
+
}),
|
|
195
|
+
(0, resolveBuildConfig_1.createResolveBuildConfigBuildFunction)(buildToolsContext).createBuildStepFromFunctionCall(globalCtx, { workingDirectory }),
|
|
154
196
|
resolveAppleTeamIdFromCredentials,
|
|
155
197
|
prebuildStep,
|
|
156
198
|
restoreCache,
|
|
157
199
|
calculateEASUpdateRuntimeVersion,
|
|
158
200
|
installPods,
|
|
159
201
|
configureEASUpdate,
|
|
160
|
-
(0, configureIosCredentials_1.configureIosCredentialsFunction)().createBuildStepFromFunctionCall(globalCtx
|
|
161
|
-
|
|
202
|
+
(0, configureIosCredentials_1.configureIosCredentialsFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
203
|
+
workingDirectory,
|
|
204
|
+
}),
|
|
205
|
+
(0, configureIosVersion_1.configureIosVersionFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
206
|
+
workingDirectory,
|
|
207
|
+
}),
|
|
162
208
|
...((0, eagerBundle_1.shouldUseEagerBundle)(globalCtx.staticContext.metadata)
|
|
163
209
|
? [
|
|
164
210
|
(0, eagerBundle_2.eagerBundleBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
211
|
+
workingDirectory,
|
|
165
212
|
callInputs: {
|
|
166
213
|
resolved_eas_update_runtime_version: '${ steps.calculate_eas_update_runtime_version.resolved_eas_update_runtime_version }',
|
|
167
214
|
},
|
|
@@ -170,50 +217,64 @@ function createStepsForIosBuildWithCredentials({ globalCtx, buildToolsContext, }
|
|
|
170
217
|
: []),
|
|
171
218
|
generateGymfile,
|
|
172
219
|
runFastlane,
|
|
173
|
-
(0, findAndUploadBuildArtifacts_1.createFindAndUploadBuildArtifactsBuildFunction)(buildToolsContext).createBuildStepFromFunctionCall(globalCtx),
|
|
220
|
+
(0, findAndUploadBuildArtifacts_1.createFindAndUploadBuildArtifactsBuildFunction)(buildToolsContext).createBuildStepFromFunctionCall(globalCtx, { workingDirectory }),
|
|
174
221
|
saveCache,
|
|
175
|
-
(0, restoreBuildCache_1.createCacheStatsBuildFunction)().createBuildStepFromFunctionCall(globalCtx
|
|
222
|
+
(0, restoreBuildCache_1.createCacheStatsBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
223
|
+
workingDirectory,
|
|
224
|
+
}),
|
|
176
225
|
];
|
|
177
226
|
}
|
|
178
|
-
function createStepsForAndroidBuildWithoutCredentials({ globalCtx, buildToolsContext, }) {
|
|
227
|
+
function createStepsForAndroidBuildWithoutCredentials({ globalCtx, buildToolsContext, workingDirectory, }) {
|
|
179
228
|
const evictUsedBefore = new Date();
|
|
180
229
|
const calculateEASUpdateRuntimeVersion = (0, calculateEASUpdateRuntimeVersion_1.calculateEASUpdateRuntimeVersionFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
181
230
|
id: 'calculate_eas_update_runtime_version',
|
|
231
|
+
workingDirectory,
|
|
182
232
|
});
|
|
183
233
|
const configureEASUpdate = (0, configureEASUpdateIfInstalled_1.configureEASUpdateIfInstalledFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
234
|
+
workingDirectory,
|
|
184
235
|
callInputs: {
|
|
185
236
|
throw_if_not_configured: false,
|
|
186
237
|
resolved_eas_update_runtime_version: '${ steps.calculate_eas_update_runtime_version.resolved_eas_update_runtime_version }',
|
|
187
238
|
},
|
|
188
239
|
});
|
|
189
240
|
const restoreCache = (0, restoreBuildCache_1.createRestoreBuildCacheFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
241
|
+
workingDirectory,
|
|
190
242
|
callInputs: {
|
|
191
243
|
platform: eas_build_job_1.Platform.ANDROID,
|
|
192
244
|
},
|
|
193
245
|
});
|
|
194
246
|
const runGradle = (0, runGradle_1.runGradleFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
195
247
|
id: 'run_gradle',
|
|
248
|
+
workingDirectory,
|
|
196
249
|
callInputs: {
|
|
197
250
|
resolved_eas_update_runtime_version: '${ steps.calculate_eas_update_runtime_version.resolved_eas_update_runtime_version }',
|
|
198
251
|
},
|
|
199
252
|
});
|
|
200
253
|
const saveCache = (0, saveBuildCache_1.createSaveBuildCacheFunction)(evictUsedBefore).createBuildStepFromFunctionCall(globalCtx, {
|
|
254
|
+
workingDirectory,
|
|
201
255
|
callInputs: {
|
|
202
256
|
platform: eas_build_job_1.Platform.ANDROID,
|
|
203
257
|
},
|
|
204
258
|
});
|
|
205
259
|
return [
|
|
206
260
|
(0, checkout_1.createCheckoutBuildFunction)().createBuildStepFromFunctionCall(globalCtx),
|
|
207
|
-
(0, useNpmToken_1.createSetUpNpmrcBuildFunction)().createBuildStepFromFunctionCall(globalCtx
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
(0,
|
|
261
|
+
(0, useNpmToken_1.createSetUpNpmrcBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
262
|
+
workingDirectory,
|
|
263
|
+
}),
|
|
264
|
+
(0, installNodeModules_1.createInstallNodeModulesBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
265
|
+
workingDirectory,
|
|
266
|
+
}),
|
|
267
|
+
(0, resolveBuildConfig_1.createResolveBuildConfigBuildFunction)(buildToolsContext).createBuildStepFromFunctionCall(globalCtx, { workingDirectory }),
|
|
268
|
+
(0, prebuild_1.createPrebuildBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
269
|
+
workingDirectory,
|
|
270
|
+
}),
|
|
211
271
|
restoreCache,
|
|
212
272
|
calculateEASUpdateRuntimeVersion,
|
|
213
273
|
configureEASUpdate,
|
|
214
274
|
...((0, eagerBundle_1.shouldUseEagerBundle)(globalCtx.staticContext.metadata)
|
|
215
275
|
? [
|
|
216
276
|
(0, eagerBundle_2.eagerBundleBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
277
|
+
workingDirectory,
|
|
217
278
|
callInputs: {
|
|
218
279
|
resolved_eas_update_runtime_version: '${ steps.calculate_eas_update_runtime_version.resolved_eas_update_runtime_version }',
|
|
219
280
|
},
|
|
@@ -221,61 +282,81 @@ function createStepsForAndroidBuildWithoutCredentials({ globalCtx, buildToolsCon
|
|
|
221
282
|
]
|
|
222
283
|
: []),
|
|
223
284
|
runGradle,
|
|
224
|
-
(0, findAndUploadBuildArtifacts_1.createFindAndUploadBuildArtifactsBuildFunction)(buildToolsContext).createBuildStepFromFunctionCall(globalCtx),
|
|
285
|
+
(0, findAndUploadBuildArtifacts_1.createFindAndUploadBuildArtifactsBuildFunction)(buildToolsContext).createBuildStepFromFunctionCall(globalCtx, { workingDirectory }),
|
|
225
286
|
saveCache,
|
|
226
|
-
(0, restoreBuildCache_1.createCacheStatsBuildFunction)().createBuildStepFromFunctionCall(globalCtx
|
|
287
|
+
(0, restoreBuildCache_1.createCacheStatsBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
288
|
+
workingDirectory,
|
|
289
|
+
}),
|
|
227
290
|
];
|
|
228
291
|
}
|
|
229
|
-
function createStepsForAndroidBuildWithCredentials({ globalCtx, buildToolsContext, }) {
|
|
292
|
+
function createStepsForAndroidBuildWithCredentials({ globalCtx, buildToolsContext, workingDirectory, }) {
|
|
230
293
|
const evictUsedBefore = new Date();
|
|
231
294
|
const calculateEASUpdateRuntimeVersion = (0, calculateEASUpdateRuntimeVersion_1.calculateEASUpdateRuntimeVersionFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
232
295
|
id: 'calculate_eas_update_runtime_version',
|
|
296
|
+
workingDirectory,
|
|
233
297
|
});
|
|
234
298
|
const configureEASUpdate = (0, configureEASUpdateIfInstalled_1.configureEASUpdateIfInstalledFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
299
|
+
workingDirectory,
|
|
235
300
|
callInputs: {
|
|
236
301
|
throw_if_not_configured: false,
|
|
237
302
|
resolved_eas_update_runtime_version: '${ steps.calculate_eas_update_runtime_version.resolved_eas_update_runtime_version }',
|
|
238
303
|
},
|
|
239
304
|
});
|
|
240
305
|
const restoreCache = (0, restoreBuildCache_1.createRestoreBuildCacheFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
306
|
+
workingDirectory,
|
|
241
307
|
callInputs: {
|
|
242
308
|
platform: eas_build_job_1.Platform.ANDROID,
|
|
243
309
|
},
|
|
244
310
|
});
|
|
245
311
|
const runGradle = (0, runGradle_1.runGradleFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
246
312
|
id: 'run_gradle',
|
|
313
|
+
workingDirectory,
|
|
247
314
|
callInputs: {
|
|
248
315
|
resolved_eas_update_runtime_version: '${ steps.calculate_eas_update_runtime_version.resolved_eas_update_runtime_version }',
|
|
249
316
|
},
|
|
250
317
|
});
|
|
251
318
|
const saveCache = (0, saveBuildCache_1.createSaveBuildCacheFunction)(evictUsedBefore).createBuildStepFromFunctionCall(globalCtx, {
|
|
319
|
+
workingDirectory,
|
|
252
320
|
callInputs: {
|
|
253
321
|
platform: eas_build_job_1.Platform.ANDROID,
|
|
254
322
|
},
|
|
255
323
|
});
|
|
256
324
|
return [
|
|
257
325
|
(0, checkout_1.createCheckoutBuildFunction)().createBuildStepFromFunctionCall(globalCtx),
|
|
258
|
-
(0, useNpmToken_1.createSetUpNpmrcBuildFunction)().createBuildStepFromFunctionCall(globalCtx
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
(0,
|
|
326
|
+
(0, useNpmToken_1.createSetUpNpmrcBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
327
|
+
workingDirectory,
|
|
328
|
+
}),
|
|
329
|
+
(0, installNodeModules_1.createInstallNodeModulesBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
330
|
+
workingDirectory,
|
|
331
|
+
}),
|
|
332
|
+
(0, resolveBuildConfig_1.createResolveBuildConfigBuildFunction)(buildToolsContext).createBuildStepFromFunctionCall(globalCtx, { workingDirectory }),
|
|
333
|
+
(0, prebuild_1.createPrebuildBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
334
|
+
workingDirectory,
|
|
335
|
+
}),
|
|
262
336
|
restoreCache,
|
|
263
337
|
calculateEASUpdateRuntimeVersion,
|
|
264
338
|
configureEASUpdate,
|
|
265
|
-
(0, injectAndroidCredentials_1.injectAndroidCredentialsFunction)().createBuildStepFromFunctionCall(globalCtx
|
|
266
|
-
|
|
339
|
+
(0, injectAndroidCredentials_1.injectAndroidCredentialsFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
340
|
+
workingDirectory,
|
|
341
|
+
}),
|
|
342
|
+
(0, configureAndroidVersion_1.configureAndroidVersionFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
343
|
+
workingDirectory,
|
|
344
|
+
}),
|
|
267
345
|
runGradle,
|
|
268
346
|
...((0, eagerBundle_1.shouldUseEagerBundle)(globalCtx.staticContext.metadata)
|
|
269
347
|
? [
|
|
270
348
|
(0, eagerBundle_2.eagerBundleBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
349
|
+
workingDirectory,
|
|
271
350
|
callInputs: {
|
|
272
351
|
resolved_eas_update_runtime_version: '${ steps.calculate_eas_update_runtime_version.resolved_eas_update_runtime_version }',
|
|
273
352
|
},
|
|
274
353
|
}),
|
|
275
354
|
]
|
|
276
355
|
: []),
|
|
277
|
-
(0, findAndUploadBuildArtifacts_1.createFindAndUploadBuildArtifactsBuildFunction)(buildToolsContext).createBuildStepFromFunctionCall(globalCtx),
|
|
356
|
+
(0, findAndUploadBuildArtifacts_1.createFindAndUploadBuildArtifactsBuildFunction)(buildToolsContext).createBuildStepFromFunctionCall(globalCtx, { workingDirectory }),
|
|
278
357
|
saveCache,
|
|
279
|
-
(0, restoreBuildCache_1.createCacheStatsBuildFunction)().createBuildStepFromFunctionCall(globalCtx
|
|
358
|
+
(0, restoreBuildCache_1.createCacheStatsBuildFunction)().createBuildStepFromFunctionCall(globalCtx, {
|
|
359
|
+
workingDirectory,
|
|
360
|
+
}),
|
|
280
361
|
];
|
|
281
362
|
}
|
|
@@ -11,6 +11,7 @@ const plist_1 = __importDefault(require("@expo/plist"));
|
|
|
11
11
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
12
12
|
const uniq_1 = __importDefault(require("lodash/uniq"));
|
|
13
13
|
const path_1 = __importDefault(require("path"));
|
|
14
|
+
const provisioningProfile_1 = require("./credentials/provisioningProfile");
|
|
14
15
|
async function configureCredentialsAsync(logger, workingDir, { credentials, buildConfiguration, }) {
|
|
15
16
|
const targetNames = Object.keys(credentials.targetProvisioningProfiles);
|
|
16
17
|
for (const targetName of targetNames) {
|
|
@@ -21,6 +22,9 @@ async function configureCredentialsAsync(logger, workingDir, { credentials, buil
|
|
|
21
22
|
profileName: profile.name,
|
|
22
23
|
appleTeamId: profile.teamId,
|
|
23
24
|
buildConfiguration,
|
|
25
|
+
...(credentials.distributionType === provisioningProfile_1.DistributionType.DEVELOPMENT && {
|
|
26
|
+
codeSignIdentity: profile.certificateCommonName,
|
|
27
|
+
}),
|
|
24
28
|
});
|
|
25
29
|
}
|
|
26
30
|
}
|
|
@@ -16,6 +16,7 @@ var DistributionType;
|
|
|
16
16
|
(function (DistributionType) {
|
|
17
17
|
DistributionType["AD_HOC"] = "ad-hoc";
|
|
18
18
|
DistributionType["APP_STORE"] = "app-store";
|
|
19
|
+
DistributionType["DEVELOPMENT"] = "development";
|
|
19
20
|
DistributionType["ENTERPRISE"] = "enterprise";
|
|
20
21
|
})(DistributionType || (exports.DistributionType = DistributionType = {}));
|
|
21
22
|
const PROVISIONING_PROFILES_DIRECTORY = path_1.default.join(os_1.default.homedir(), 'Library/MobileDevice/Provisioning Profiles');
|
|
@@ -105,6 +106,10 @@ class ProvisioningProfile {
|
|
|
105
106
|
return DistributionType.ENTERPRISE;
|
|
106
107
|
}
|
|
107
108
|
else if (plistData.ProvisionedDevices) {
|
|
109
|
+
const entitlements = plistData.Entitlements;
|
|
110
|
+
if (entitlements?.['get-task-allow']) {
|
|
111
|
+
return DistributionType.DEVELOPMENT;
|
|
112
|
+
}
|
|
108
113
|
return DistributionType.AD_HOC;
|
|
109
114
|
}
|
|
110
115
|
else {
|
package/dist/utils/project.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { SpawnOptions, SpawnPromise, SpawnResult } from '@expo/turtle-spawn';
|
|
2
2
|
import { PackageManager } from '../utils/packageManager';
|
|
3
3
|
/**
|
|
4
|
-
* check if .yarnrc.yml exists in the project dir or in the workspace root dir
|
|
4
|
+
* check if .yarnrc.yml exists in the project dir or in the workspace root dir,
|
|
5
|
+
* or if the `yarn.lock` file is classic one, not a modern one
|
|
5
6
|
*/
|
|
6
7
|
export declare function isUsingModernYarnVersion(projectDir: string): Promise<boolean>;
|
|
7
8
|
export declare function runExpoCliCommand({ packageManager, args, options, }: {
|
package/dist/utils/project.js
CHANGED
|
@@ -11,13 +11,40 @@ const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
|
|
|
11
11
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
12
12
|
const path_1 = __importDefault(require("path"));
|
|
13
13
|
const packageManager_1 = require("../utils/packageManager");
|
|
14
|
+
async function readFirstChars(filePath, chars) {
|
|
15
|
+
return new Promise((resolve, reject) => {
|
|
16
|
+
const chunks = [];
|
|
17
|
+
const stream = fs_extra_1.default.createReadStream(filePath, {
|
|
18
|
+
start: 0,
|
|
19
|
+
end: chars - 1,
|
|
20
|
+
});
|
|
21
|
+
stream.on('error', reject);
|
|
22
|
+
stream.on('data', chunk => {
|
|
23
|
+
chunks.push(chunk);
|
|
24
|
+
});
|
|
25
|
+
stream.on('end', () => {
|
|
26
|
+
resolve(Buffer.concat(chunks).toString('utf8'));
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
}
|
|
14
30
|
/**
|
|
15
|
-
* check if .yarnrc.yml exists in the project dir or in the workspace root dir
|
|
31
|
+
* check if .yarnrc.yml exists in the project dir or in the workspace root dir,
|
|
32
|
+
* or if the `yarn.lock` file is classic one, not a modern one
|
|
16
33
|
*/
|
|
17
34
|
async function isUsingModernYarnVersion(projectDir) {
|
|
35
|
+
const rootDir = (0, packageManager_1.findPackagerRootDir)(projectDir);
|
|
18
36
|
const yarnrcPath = path_1.default.join(projectDir, '.yarnrc.yml');
|
|
19
37
|
const yarnrcRootPath = path_1.default.join((0, packageManager_1.findPackagerRootDir)(projectDir), '.yarnrc.yml');
|
|
20
|
-
|
|
38
|
+
if ((await fs_extra_1.default.pathExists(yarnrcPath)) || (await fs_extra_1.default.pathExists(yarnrcRootPath))) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
const yarnlockPath = path_1.default.join(rootDir, 'yarn.lock');
|
|
42
|
+
if (!(await fs_extra_1.default.pathExists(yarnlockPath))) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
// The yarn.lock file is for Yarn Classic, not Modern, if it contains "# yarn lockfile v1"
|
|
46
|
+
const startOfLockfile = await readFirstChars(yarnlockPath, 100);
|
|
47
|
+
return !/yarn lockfile v1/i.test(startOfLockfile);
|
|
21
48
|
}
|
|
22
49
|
function runExpoCliCommand({ packageManager, args, options, }) {
|
|
23
50
|
const argsWithExpo = ['expo', ...args];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/build-tools",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.6.0",
|
|
4
4
|
"bugs": "https://github.com/expo/eas-cli/issues",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Expo <support@expo.io>",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"@expo/config": "55.0.10",
|
|
39
39
|
"@expo/config-plugins": "55.0.7",
|
|
40
40
|
"@expo/downloader": "18.5.0",
|
|
41
|
-
"@expo/eas-build-job": "18.
|
|
41
|
+
"@expo/eas-build-job": "18.6.0",
|
|
42
42
|
"@expo/env": "^0.4.0",
|
|
43
43
|
"@expo/logger": "18.5.0",
|
|
44
44
|
"@expo/package-manager": "1.9.10",
|
|
45
45
|
"@expo/plist": "^0.2.0",
|
|
46
46
|
"@expo/results": "^1.0.0",
|
|
47
47
|
"@expo/spawn-async": "1.7.2",
|
|
48
|
-
"@expo/steps": "18.
|
|
48
|
+
"@expo/steps": "18.6.0",
|
|
49
49
|
"@expo/template-file": "18.5.0",
|
|
50
50
|
"@expo/turtle-spawn": "18.5.0",
|
|
51
51
|
"@expo/xcpretty": "^4.3.1",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"typescript": "^5.5.4",
|
|
99
99
|
"uuid": "^9.0.1"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "0fb6dfc334f0e496d701ff2afad0d15da9a83478"
|
|
102
102
|
}
|