@expo/build-tools 19.0.6 → 19.1.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/common/easBuildInternal.js +8 -0
- package/dist/context.d.ts +1 -3
- package/dist/context.js +0 -3
- package/dist/steps/utils/ios/xcactivitylog.js +9 -1
- package/dist/templates/FastfileResign.d.ts +1 -1
- package/dist/templates/FastfileResign.js +1 -0
- package/dist/utils/artifacts.js +60 -0
- package/package.json +4 -4
|
@@ -28,6 +28,10 @@ async function runEasBuildInternalAsync({ job, logger, env, cwd, projectRootOver
|
|
|
28
28
|
else if (githubTriggerOptions?.autoSubmit) {
|
|
29
29
|
autoSubmitArgs.push('--auto-submit');
|
|
30
30
|
}
|
|
31
|
+
const refreshAdHocProvisioningProfileArgs = [];
|
|
32
|
+
if (job.platform === eas_build_job_1.Platform.IOS && job.refreshAdHocProvisioningProfile === true) {
|
|
33
|
+
refreshAdHocProvisioningProfileArgs.push('--refresh-ad-hoc-provisioning-profile');
|
|
34
|
+
}
|
|
31
35
|
try {
|
|
32
36
|
const result = await (0, turtle_spawn_1.default)(cmd, [
|
|
33
37
|
...args,
|
|
@@ -37,6 +41,7 @@ async function runEasBuildInternalAsync({ job, logger, env, cwd, projectRootOver
|
|
|
37
41
|
'--profile',
|
|
38
42
|
buildProfile,
|
|
39
43
|
...autoSubmitArgs,
|
|
44
|
+
...refreshAdHocProvisioningProfileArgs,
|
|
40
45
|
], {
|
|
41
46
|
cwd,
|
|
42
47
|
env: {
|
|
@@ -106,6 +111,9 @@ function validateEasBuildInternalResult({ oldJob, result, }) {
|
|
|
106
111
|
// We want to retain values that we have set on the job.
|
|
107
112
|
appId: oldJob.appId,
|
|
108
113
|
initiatingUserId: oldJob.initiatingUserId,
|
|
114
|
+
...(oldJob.platform === eas_build_job_1.Platform.IOS && oldJob.refreshAdHocProvisioningProfile === true
|
|
115
|
+
? { refreshAdHocProvisioningProfile: true }
|
|
116
|
+
: null),
|
|
109
117
|
});
|
|
110
118
|
(0, assert_1.default)(newJob.platform === oldJob.platform, 'eas-cli returned a job for a wrong platform');
|
|
111
119
|
const newMetadata = (0, eas_build_job_1.sanitizeMetadata)(value.metadata);
|
package/dist/context.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
|
-
import { BuildPhase,
|
|
2
|
+
import { BuildPhase, Env, GenericArtifactType, Job, ManagedArtifactType, Metadata } from '@expo/eas-build-job';
|
|
3
3
|
import { bunyan } from '@expo/logger';
|
|
4
4
|
import { Client } from '@urql/core';
|
|
5
5
|
import { PackageManager } from './utils/packageManager';
|
|
@@ -44,7 +44,6 @@ export interface BuildContextOptions {
|
|
|
44
44
|
tags?: Record<string, string>;
|
|
45
45
|
extras?: Record<string, string>;
|
|
46
46
|
}) => void;
|
|
47
|
-
reportBuildPhaseStats?: (stats: BuildPhaseStats) => void;
|
|
48
47
|
skipNativeBuild?: boolean;
|
|
49
48
|
metadata?: Metadata;
|
|
50
49
|
expoApiV2BaseUrl?: string;
|
|
@@ -73,7 +72,6 @@ export declare class BuildContext<TJob extends Job = Job> {
|
|
|
73
72
|
private buildPhaseSkipped;
|
|
74
73
|
private buildPhaseHasWarnings;
|
|
75
74
|
private _appConfig?;
|
|
76
|
-
private readonly reportBuildPhaseStats?;
|
|
77
75
|
readonly graphqlClient: Client;
|
|
78
76
|
constructor(job: TJob, options: BuildContextOptions);
|
|
79
77
|
get job(): TJob;
|
package/dist/context.js
CHANGED
|
@@ -36,7 +36,6 @@ class BuildContext {
|
|
|
36
36
|
buildPhaseSkipped = false;
|
|
37
37
|
buildPhaseHasWarnings = false;
|
|
38
38
|
_appConfig;
|
|
39
|
-
reportBuildPhaseStats;
|
|
40
39
|
graphqlClient;
|
|
41
40
|
constructor(job, options) {
|
|
42
41
|
this.workingdir = options.workingdir;
|
|
@@ -50,7 +49,6 @@ class BuildContext {
|
|
|
50
49
|
this._metadata = options.metadata;
|
|
51
50
|
this.skipNativeBuild = options.skipNativeBuild;
|
|
52
51
|
this.expoApiV2BaseUrl = options.expoApiV2BaseUrl;
|
|
53
|
-
this.reportBuildPhaseStats = options.reportBuildPhaseStats;
|
|
54
52
|
const environmentSecrets = this.getEnvironmentSecrets(job);
|
|
55
53
|
this._env = {
|
|
56
54
|
...options.env,
|
|
@@ -235,7 +233,6 @@ class BuildContext {
|
|
|
235
233
|
return;
|
|
236
234
|
}
|
|
237
235
|
await this.collectAndUpdateEnvVariablesAsync();
|
|
238
|
-
this.reportBuildPhaseStats?.({ buildPhase: this.buildPhase, result, durationMs });
|
|
239
236
|
if (this.job.platform) {
|
|
240
237
|
datadog_1.Datadog.distribution('eas.build.phase_duration', durationMs, {
|
|
241
238
|
build_phase: this.buildPhase.toLowerCase(),
|
|
@@ -67,7 +67,15 @@ async function parseAndReportXcactivitylog({ derivedDataPath, workspacePath, xcl
|
|
|
67
67
|
catch (err) {
|
|
68
68
|
logger.info('Build performance analysis skipped.');
|
|
69
69
|
const msg = `Build performance analysis failed during "${phase}"`;
|
|
70
|
-
sentry_1.Sentry.capture(msg, err, {
|
|
70
|
+
sentry_1.Sentry.capture(msg, err, {
|
|
71
|
+
tags: { phase },
|
|
72
|
+
extras: {
|
|
73
|
+
exitStatus: err?.status,
|
|
74
|
+
signal: err?.signal,
|
|
75
|
+
stderr: err?.stderr?.slice(-4000),
|
|
76
|
+
stdout: err?.stdout?.slice(-4000),
|
|
77
|
+
},
|
|
78
|
+
});
|
|
71
79
|
}
|
|
72
80
|
finally {
|
|
73
81
|
if (tempDir) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const FastfileResignTemplate = "lane :do_resign do\n resign(\n ipa: \"<%- IPA_PATH %>\",\n signing_identity: \"<%- SIGNING_IDENTITY %>\",\n provisioning_profile: {<% _.forEach(PROFILES, function(profile) { %>\n \"<%- profile.BUNDLE_ID %>\" => \"<%- profile.PATH %>\",<% }); %>\n },\n keychain_path: \"<%- KEYCHAIN_PATH %>\"\n )\nend\n";
|
|
1
|
+
export declare const FastfileResignTemplate = "lane :do_resign do\n resign(\n ipa: \"<%- IPA_PATH %>\",\n signing_identity: \"<%- SIGNING_IDENTITY %>\",\n provisioning_profile: {<% _.forEach(PROFILES, function(profile) { %>\n \"<%- profile.BUNDLE_ID %>\" => \"<%- profile.PATH %>\",<% }); %>\n },\n use_app_entitlements: true,\n keychain_path: \"<%- KEYCHAIN_PATH %>\"\n )\nend\n";
|
|
@@ -8,6 +8,7 @@ exports.FastfileResignTemplate = `lane :do_resign do
|
|
|
8
8
|
provisioning_profile: {<% _.forEach(PROFILES, function(profile) { %>
|
|
9
9
|
"<%- profile.BUNDLE_ID %>" => "<%- profile.PATH %>",<% }); %>
|
|
10
10
|
},
|
|
11
|
+
use_app_entitlements: true,
|
|
11
12
|
keychain_path: "<%- KEYCHAIN_PATH %>"
|
|
12
13
|
)
|
|
13
14
|
end
|
package/dist/utils/artifacts.js
CHANGED
|
@@ -13,6 +13,7 @@ const fast_glob_1 = __importDefault(require("fast-glob"));
|
|
|
13
13
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
14
14
|
const path_1 = __importDefault(require("path"));
|
|
15
15
|
const promise_limit_1 = __importDefault(require("promise-limit"));
|
|
16
|
+
const sentry_1 = require("../sentry");
|
|
16
17
|
class FindArtifactsError extends Error {
|
|
17
18
|
}
|
|
18
19
|
exports.FindArtifactsError = FindArtifactsError;
|
|
@@ -22,6 +23,11 @@ async function findArtifacts({ rootDir, patternOrPath, logger, }) {
|
|
|
22
23
|
? [patternOrPath]
|
|
23
24
|
: []
|
|
24
25
|
: await (0, fast_glob_1.default)(patternOrPath, { cwd: rootDir, onlyFiles: false });
|
|
26
|
+
await maybeReportAbsoluteGlobDryRunMismatchAsync({
|
|
27
|
+
rootDir,
|
|
28
|
+
patternOrPath,
|
|
29
|
+
files,
|
|
30
|
+
});
|
|
25
31
|
if (files.length === 0) {
|
|
26
32
|
if (fast_glob_1.default.isDynamicPattern(patternOrPath)) {
|
|
27
33
|
throw new FindArtifactsError(`There are no files matching pattern "${patternOrPath}"`);
|
|
@@ -44,6 +50,60 @@ async function findArtifacts({ rootDir, patternOrPath, logger, }) {
|
|
|
44
50
|
return path_1.default.join(rootDir, filePath);
|
|
45
51
|
});
|
|
46
52
|
}
|
|
53
|
+
async function findArtifactsWithAbsoluteGlobSupportDryRunAsync(rootDir, patternOrPath) {
|
|
54
|
+
return path_1.default.isAbsolute(patternOrPath) && !fast_glob_1.default.isDynamicPattern(patternOrPath)
|
|
55
|
+
? (await fs_extra_1.default.pathExists(patternOrPath))
|
|
56
|
+
? [patternOrPath]
|
|
57
|
+
: []
|
|
58
|
+
: await (0, fast_glob_1.default)(patternOrPath, { cwd: rootDir, onlyFiles: false });
|
|
59
|
+
}
|
|
60
|
+
async function maybeReportAbsoluteGlobDryRunMismatchAsync({ rootDir, patternOrPath, files, }) {
|
|
61
|
+
if (!path_1.default.isAbsolute(patternOrPath)) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
try {
|
|
65
|
+
const filesWithAbsoluteGlobSupport = await findArtifactsWithAbsoluteGlobSupportDryRunAsync(rootDir, patternOrPath);
|
|
66
|
+
if (areArtifactListsEqual(files, filesWithAbsoluteGlobSupport)) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
sentry_1.Sentry.capture(new Error('findArtifacts output changed for an absolute path'), {
|
|
70
|
+
tags: {
|
|
71
|
+
source: 'find-artifacts',
|
|
72
|
+
reason: 'absolute_path',
|
|
73
|
+
},
|
|
74
|
+
extras: {
|
|
75
|
+
rootDir,
|
|
76
|
+
patternOrPath,
|
|
77
|
+
currentCount: files.length,
|
|
78
|
+
dryRunCount: filesWithAbsoluteGlobSupport.length,
|
|
79
|
+
currentSample: files.slice(0, 20),
|
|
80
|
+
dryRunSample: filesWithAbsoluteGlobSupport.slice(0, 20),
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
catch (err) {
|
|
85
|
+
sentry_1.Sentry.capture(err, {
|
|
86
|
+
tags: {
|
|
87
|
+
source: 'find-artifacts',
|
|
88
|
+
reason: 'absolute_path_dry_run_failed',
|
|
89
|
+
},
|
|
90
|
+
extras: {
|
|
91
|
+
rootDir,
|
|
92
|
+
patternOrPath,
|
|
93
|
+
currentCount: files.length,
|
|
94
|
+
currentSample: files.slice(0, 20),
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function areArtifactListsEqual(first, second) {
|
|
100
|
+
if (first.length !== second.length) {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
const sortedFirst = [...first].sort();
|
|
104
|
+
const sortedSecond = [...second].sort();
|
|
105
|
+
return sortedFirst.every((artifactPath, index) => artifactPath === sortedSecond[index]);
|
|
106
|
+
}
|
|
47
107
|
async function logMissingFileError(artifactPath, buildLogger) {
|
|
48
108
|
let currentPath = artifactPath;
|
|
49
109
|
while (!(await fs_extra_1.default.pathExists(currentPath))) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/build-tools",
|
|
3
|
-
"version": "19.0
|
|
3
|
+
"version": "19.1.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": "19.0.0",
|
|
41
|
-
"@expo/eas-build-job": "19.
|
|
41
|
+
"@expo/eas-build-job": "19.1.0",
|
|
42
42
|
"@expo/env": "^0.4.0",
|
|
43
43
|
"@expo/logger": "19.0.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": "19.
|
|
48
|
+
"@expo/steps": "19.1.0",
|
|
49
49
|
"@expo/template-file": "19.0.0",
|
|
50
50
|
"@expo/turtle-spawn": "19.0.0",
|
|
51
51
|
"@expo/xcpretty": "^4.3.1",
|
|
@@ -99,5 +99,5 @@
|
|
|
99
99
|
"typescript": "^5.5.4",
|
|
100
100
|
"uuid": "^9.0.1"
|
|
101
101
|
},
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "27a2e2abc752aa0123075958651a796fe045d601"
|
|
103
103
|
}
|