eas-cli 0.56.0 → 0.59.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/README.md +98 -49
- package/build/branch/queries.d.ts +5 -0
- package/build/branch/queries.js +87 -0
- package/build/build/android/build.js +17 -3
- package/build/build/android/graphql.js +2 -0
- package/build/build/android/prepareJob.js +5 -0
- package/build/build/android/syncProjectConfiguration.d.ts +3 -4
- package/build/build/android/syncProjectConfiguration.js +2 -3
- package/build/build/android/version.d.ts +11 -0
- package/build/build/android/version.js +71 -1
- package/build/build/build.js +1 -1
- package/build/build/context.d.ts +5 -0
- package/build/build/createContext.d.ts +3 -1
- package/build/build/createContext.js +8 -1
- package/build/build/ios/build.js +17 -1
- package/build/build/ios/graphql.js +2 -0
- package/build/build/ios/prepareJob.js +5 -0
- package/build/build/ios/syncProjectConfiguration.d.ts +3 -4
- package/build/build/ios/syncProjectConfiguration.js +2 -3
- package/build/build/ios/version.d.ts +13 -0
- package/build/build/ios/version.js +72 -1
- package/build/build/local.d.ts +2 -2
- package/build/build/local.js +7 -7
- package/build/build/metadata.d.ts +1 -0
- package/build/build/metadata.js +32 -6
- package/build/build/runBuildAndSubmit.d.ts +1 -0
- package/build/build/runBuildAndSubmit.js +24 -3
- package/build/build/utils/printBuildInfo.d.ts +1 -1
- package/build/build/utils/printBuildInfo.js +7 -13
- package/build/commandUtils/pagination.d.ts +13 -0
- package/build/commandUtils/pagination.js +42 -0
- package/build/commands/branch/list.d.ts +3 -4
- package/build/commands/branch/list.js +6 -69
- package/build/commands/branch/view.d.ts +3 -0
- package/build/commands/branch/view.js +15 -63
- package/build/commands/build/index.d.ts +1 -0
- package/build/commands/build/index.js +9 -0
- package/build/commands/build/version/set.d.ts +0 -1
- package/build/commands/build/version/set.js +2 -3
- package/build/commands/build/version/sync.d.ts +0 -1
- package/build/commands/build/version/sync.js +2 -3
- package/build/commands/submit.js +4 -1
- package/build/commands/update/index.d.ts +2 -2
- package/build/commands/update/index.js +22 -6
- package/build/commands/update/list.js +13 -18
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +2 -2
- package/build/devices/actions/create/action.d.ts +5 -2
- package/build/devices/actions/create/action.js +12 -2
- package/build/devices/actions/create/developerPortalMethod.d.ts +6 -0
- package/build/devices/actions/create/developerPortalMethod.js +90 -0
- package/build/devices/manager.js +4 -4
- package/build/graphql/generated.d.ts +424 -61
- package/build/graphql/generated.js +9 -1
- package/build/graphql/mutations/PublishMutation.d.ts +2 -4
- package/build/graphql/queries/BranchQuery.d.ts +2 -1
- package/build/graphql/queries/BranchQuery.js +26 -0
- package/build/graphql/queries/BuildQuery.d.ts +4 -1
- package/build/graphql/queries/BuildQuery.js +19 -0
- package/build/graphql/queries/PublishQuery.d.ts +2 -1
- package/build/graphql/queries/PublishQuery.js +16 -0
- package/build/graphql/queries/UpdateQuery.d.ts +6 -8
- package/build/graphql/queries/UpdateQuery.js +27 -23
- package/build/graphql/types/Build.d.ts +1 -0
- package/build/graphql/types/Build.js +16 -1
- package/build/metadata/apple/config/reader.d.ts +3 -2
- package/build/metadata/apple/config/reader.js +22 -5
- package/build/metadata/apple/config/writer.d.ts +3 -2
- package/build/metadata/apple/config/writer.js +22 -6
- package/build/metadata/apple/tasks/app-version.d.ts +5 -1
- package/build/metadata/apple/tasks/app-version.js +109 -8
- package/build/metadata/apple/tasks/index.d.ts +6 -1
- package/build/metadata/apple/tasks/index.js +7 -2
- package/build/metadata/apple/types.d.ts +3 -7
- package/build/metadata/upload.js +6 -1
- package/build/project/publish.d.ts +3 -1
- package/build/project/publish.js +17 -8
- package/build/project/remoteVersionSource.d.ts +5 -3
- package/build/project/remoteVersionSource.js +18 -9
- package/build/submit/submit.d.ts +2 -1
- package/build/submit/submit.js +3 -2
- package/build/update/queries.d.ts +3 -0
- package/build/update/queries.js +72 -0
- package/build/update/utils.d.ts +14 -0
- package/build/update/utils.js +26 -9
- package/build/utils/expodash/chunk.d.ts +1 -0
- package/build/utils/expodash/chunk.js +16 -0
- package/build/utils/queries.d.ts +25 -0
- package/build/utils/queries.js +67 -0
- package/build/vcs/clients/gitNoCommit.d.ts +1 -0
- package/build/vcs/clients/gitNoCommit.js +14 -0
- package/oclif.manifest.json +1 -1
- package/package.json +27 -25
- package/schema/metadata-0.json +38 -233
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export declare function syncProjectConfigurationAsync({ projectDir, exp, buildProfile, }: {
|
|
2
|
+
import { AndroidVersionAutoIncrement } from '@expo/eas-json';
|
|
3
|
+
export declare function syncProjectConfigurationAsync({ projectDir, exp, localAutoIncrement, }: {
|
|
5
4
|
projectDir: string;
|
|
6
5
|
exp: ExpoConfig;
|
|
7
|
-
|
|
6
|
+
localAutoIncrement?: AndroidVersionAutoIncrement;
|
|
8
7
|
}): Promise<void>;
|
|
9
8
|
export declare function cleanUpOldEasBuildGradleScriptAsync(projectDir: string): Promise<void>;
|
|
@@ -12,10 +12,9 @@ const projectUtils_1 = require("../../project/projectUtils");
|
|
|
12
12
|
const workflow_1 = require("../../project/workflow");
|
|
13
13
|
const UpdatesModule_1 = require("../../update/android/UpdatesModule");
|
|
14
14
|
const version_1 = require("./version");
|
|
15
|
-
async function syncProjectConfigurationAsync({ projectDir, exp,
|
|
15
|
+
async function syncProjectConfigurationAsync({ projectDir, exp, localAutoIncrement, }) {
|
|
16
16
|
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID);
|
|
17
|
-
const
|
|
18
|
-
const versionBumpStrategy = resolveVersionBumpStrategy(autoIncrement !== null && autoIncrement !== void 0 ? autoIncrement : false);
|
|
17
|
+
const versionBumpStrategy = resolveVersionBumpStrategy(localAutoIncrement !== null && localAutoIncrement !== void 0 ? localAutoIncrement : false);
|
|
19
18
|
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
20
19
|
await cleanUpOldEasBuildGradleScriptAsync(projectDir);
|
|
21
20
|
if ((0, projectUtils_1.isExpoUpdatesInstalled)(projectDir)) {
|
|
@@ -25,3 +25,14 @@ export declare function updateNativeVersionsAsync({ projectDir, version, version
|
|
|
25
25
|
version?: string;
|
|
26
26
|
versionCode?: number;
|
|
27
27
|
}): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Returns buildNumber that will be used for the next build. If current build profile
|
|
30
|
+
* has an 'autoIncrement' option set, it increments the version on server.
|
|
31
|
+
*/
|
|
32
|
+
export declare function resolveRemoteVersionCodeAsync({ projectDir, projectId, exp, applicationId, buildProfile, }: {
|
|
33
|
+
projectDir: string;
|
|
34
|
+
projectId: string;
|
|
35
|
+
exp: ExpoConfig;
|
|
36
|
+
applicationId: string;
|
|
37
|
+
buildProfile: BuildProfile<Platform.ANDROID>;
|
|
38
|
+
}): Promise<string>;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateNativeVersionsAsync = exports.maybeResolveVersionsAsync = exports.bumpVersionInAppJsonAsync = exports.bumpVersionAsync = exports.BumpStrategy = void 0;
|
|
3
|
+
exports.resolveRemoteVersionCodeAsync = exports.updateNativeVersionsAsync = exports.maybeResolveVersionsAsync = exports.bumpVersionInAppJsonAsync = exports.bumpVersionAsync = exports.BumpStrategy = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
6
6
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
7
7
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
8
8
|
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
9
|
+
const generated_1 = require("../../graphql/generated");
|
|
10
|
+
const AppVersionMutation_1 = require("../../graphql/mutations/AppVersionMutation");
|
|
11
|
+
const AppVersionQuery_1 = require("../../graphql/queries/AppVersionQuery");
|
|
9
12
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
13
|
+
const ora_1 = require("../../ora");
|
|
10
14
|
const gradleUtils_1 = require("../../project/android/gradleUtils");
|
|
11
15
|
const versions_1 = require("../../project/android/versions");
|
|
12
16
|
const workflow_1 = require("../../project/workflow");
|
|
@@ -112,3 +116,69 @@ async function writeBuildGradleAsync({ projectDir, buildGradle, }) {
|
|
|
112
116
|
const buildGradlePath = config_plugins_1.AndroidConfig.Paths.getAppBuildGradleFilePath(projectDir);
|
|
113
117
|
await fs_extra_1.default.writeFile(buildGradlePath, buildGradle);
|
|
114
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* Returns buildNumber that will be used for the next build. If current build profile
|
|
121
|
+
* has an 'autoIncrement' option set, it increments the version on server.
|
|
122
|
+
*/
|
|
123
|
+
async function resolveRemoteVersionCodeAsync({ projectDir, projectId, exp, applicationId, buildProfile, }) {
|
|
124
|
+
var _a, _b, _c, _d, _e, _f;
|
|
125
|
+
const remoteVersions = await AppVersionQuery_1.AppVersionQuery.latestVersionAsync(projectId, generated_1.AppPlatform.Android, applicationId);
|
|
126
|
+
const localVersions = await maybeResolveVersionsAsync(projectDir, exp, buildProfile);
|
|
127
|
+
let currentBuildVersion;
|
|
128
|
+
if (remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion) {
|
|
129
|
+
currentBuildVersion = remoteVersions.buildVersion;
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
if (localVersions.appBuildVersion) {
|
|
133
|
+
log_1.default.warn('No remote versions are configured for this project, versionCode will be initialized based on the value from the local project.');
|
|
134
|
+
currentBuildVersion = localVersions.appBuildVersion;
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
log_1.default.error(`Remote versions are not configured and EAS CLI was not able to read the current version from your project. Use "eas build:version:set" to initialize remote versions.`);
|
|
138
|
+
throw new Error('Remote versions are not configured.');
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
if (!buildProfile.autoIncrement && (remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion)) {
|
|
142
|
+
return currentBuildVersion;
|
|
143
|
+
}
|
|
144
|
+
else if (!buildProfile.autoIncrement && !(remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion)) {
|
|
145
|
+
const spinner = (0, ora_1.ora)(`Initializing versionCode with ${chalk_1.default.bold(currentBuildVersion)}.`).start();
|
|
146
|
+
try {
|
|
147
|
+
await AppVersionMutation_1.AppVersionMutation.createAppVersionAsync({
|
|
148
|
+
appId: projectId,
|
|
149
|
+
platform: generated_1.AppPlatform.Android,
|
|
150
|
+
applicationIdentifier: applicationId,
|
|
151
|
+
storeVersion: (_b = (_a = localVersions.appVersion) !== null && _a !== void 0 ? _a : exp.version) !== null && _b !== void 0 ? _b : '1.0.0',
|
|
152
|
+
buildVersion: currentBuildVersion,
|
|
153
|
+
runtimeVersion: (_c = config_plugins_1.Updates.getRuntimeVersionNullable(exp, eas_build_job_1.Platform.ANDROID)) !== null && _c !== void 0 ? _c : undefined,
|
|
154
|
+
});
|
|
155
|
+
spinner.succeed(`Initialized versionCode with ${chalk_1.default.bold(currentBuildVersion)}.`);
|
|
156
|
+
}
|
|
157
|
+
catch (err) {
|
|
158
|
+
spinner.fail(`Failed to initialize versionCode with ${chalk_1.default.bold(currentBuildVersion)}.`);
|
|
159
|
+
throw err;
|
|
160
|
+
}
|
|
161
|
+
return currentBuildVersion;
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
const nextBuildVersion = (0, versions_1.getNextVersionCode)(currentBuildVersion);
|
|
165
|
+
const spinner = (0, ora_1.ora)(`Incrementing versionCode from ${chalk_1.default.bold(currentBuildVersion)} to ${chalk_1.default.bold(nextBuildVersion)}.`).start();
|
|
166
|
+
try {
|
|
167
|
+
await AppVersionMutation_1.AppVersionMutation.createAppVersionAsync({
|
|
168
|
+
appId: projectId,
|
|
169
|
+
platform: generated_1.AppPlatform.Android,
|
|
170
|
+
applicationIdentifier: applicationId,
|
|
171
|
+
storeVersion: (_e = (_d = localVersions.appVersion) !== null && _d !== void 0 ? _d : exp.version) !== null && _e !== void 0 ? _e : '1.0.0',
|
|
172
|
+
buildVersion: String(nextBuildVersion),
|
|
173
|
+
runtimeVersion: (_f = config_plugins_1.Updates.getRuntimeVersionNullable(exp, eas_build_job_1.Platform.ANDROID)) !== null && _f !== void 0 ? _f : undefined,
|
|
174
|
+
});
|
|
175
|
+
spinner.succeed(`Incremented versionCode from ${chalk_1.default.bold(currentBuildVersion)} to ${chalk_1.default.bold(nextBuildVersion)}.`);
|
|
176
|
+
}
|
|
177
|
+
catch (err) {
|
|
178
|
+
spinner.fail(`Failed to increment versionCode from ${chalk_1.default.bold(currentBuildVersion)} to ${chalk_1.default.bold(nextBuildVersion)}.`);
|
|
179
|
+
throw err;
|
|
180
|
+
}
|
|
181
|
+
return String(nextBuildVersion);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
exports.resolveRemoteVersionCodeAsync = resolveRemoteVersionCodeAsync;
|
package/build/build/build.js
CHANGED
|
@@ -64,7 +64,7 @@ async function prepareBuildRequestForPlatformAsync(builder) {
|
|
|
64
64
|
});
|
|
65
65
|
return async () => {
|
|
66
66
|
if (ctx.localBuildOptions.enable) {
|
|
67
|
-
await (0, local_1.runLocalBuildAsync)(job, ctx.localBuildOptions);
|
|
67
|
+
await (0, local_1.runLocalBuildAsync)(job, metadata, ctx.localBuildOptions);
|
|
68
68
|
return undefined;
|
|
69
69
|
}
|
|
70
70
|
else {
|
package/build/build/context.d.ts
CHANGED
|
@@ -13,12 +13,14 @@ export declare type CommonContext<T extends Platform> = Omit<BuildContext<T>, 'a
|
|
|
13
13
|
export interface AndroidBuildContext {
|
|
14
14
|
applicationId: string;
|
|
15
15
|
gradleContext?: GradleBuildContext;
|
|
16
|
+
versionCodeOverride?: string;
|
|
16
17
|
}
|
|
17
18
|
export interface IosBuildContext {
|
|
18
19
|
bundleIdentifier: string;
|
|
19
20
|
applicationTarget: Target;
|
|
20
21
|
targets: Target[];
|
|
21
22
|
xcodeBuildContext: XcodeBuildContext;
|
|
23
|
+
buildNumberOverride?: string;
|
|
22
24
|
}
|
|
23
25
|
export interface BuildContext<T extends Platform> {
|
|
24
26
|
accountName: string;
|
|
@@ -31,10 +33,13 @@ export interface BuildContext<T extends Platform> {
|
|
|
31
33
|
exp: ExpoConfig;
|
|
32
34
|
localBuildOptions: LocalBuildOptions;
|
|
33
35
|
nonInteractive: boolean;
|
|
36
|
+
noWait: boolean;
|
|
37
|
+
runFromCI: boolean;
|
|
34
38
|
platform: T;
|
|
35
39
|
projectDir: string;
|
|
36
40
|
projectId: string;
|
|
37
41
|
projectName: string;
|
|
42
|
+
message?: string;
|
|
38
43
|
trackingCtx: TrackingContext;
|
|
39
44
|
user: Actor;
|
|
40
45
|
workflow: Workflow;
|
|
@@ -3,14 +3,16 @@ import { BuildProfile, EasJson } from '@expo/eas-json';
|
|
|
3
3
|
import { BuildResourceClass } from '../graphql/generated';
|
|
4
4
|
import { BuildContext } from './context';
|
|
5
5
|
import { LocalBuildOptions } from './local';
|
|
6
|
-
export declare function createBuildContextAsync<T extends Platform>({ buildProfileName, buildProfile, easJsonCliConfig, clearCache, localBuildOptions, nonInteractive, platform, projectDir, resourceClass, }: {
|
|
6
|
+
export declare function createBuildContextAsync<T extends Platform>({ buildProfileName, buildProfile, easJsonCliConfig, clearCache, localBuildOptions, nonInteractive, noWait, platform, projectDir, resourceClass, message, }: {
|
|
7
7
|
buildProfileName: string;
|
|
8
8
|
buildProfile: BuildProfile<T>;
|
|
9
9
|
easJsonCliConfig: EasJson['cli'];
|
|
10
10
|
clearCache: boolean;
|
|
11
11
|
localBuildOptions: LocalBuildOptions;
|
|
12
12
|
nonInteractive: boolean;
|
|
13
|
+
noWait: boolean;
|
|
13
14
|
platform: T;
|
|
14
15
|
projectDir: string;
|
|
15
16
|
resourceClass: BuildResourceClass;
|
|
17
|
+
message?: string;
|
|
16
18
|
}): Promise<BuildContext<T>>;
|
|
@@ -4,6 +4,7 @@ exports.createBuildContextAsync = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
6
6
|
const json_file_1 = tslib_1.__importDefault(require("@expo/json-file"));
|
|
7
|
+
const getenv_1 = tslib_1.__importDefault(require("getenv"));
|
|
7
8
|
const resolve_from_1 = tslib_1.__importDefault(require("resolve-from"));
|
|
8
9
|
const uuid_1 = require("uuid");
|
|
9
10
|
const events_1 = require("../analytics/events");
|
|
@@ -15,7 +16,7 @@ const Account_1 = require("../user/Account");
|
|
|
15
16
|
const actions_1 = require("../user/actions");
|
|
16
17
|
const build_1 = require("./android/build");
|
|
17
18
|
const build_2 = require("./ios/build");
|
|
18
|
-
async function createBuildContextAsync({ buildProfileName, buildProfile, easJsonCliConfig, clearCache = false, localBuildOptions, nonInteractive
|
|
19
|
+
async function createBuildContextAsync({ buildProfileName, buildProfile, easJsonCliConfig, clearCache = false, localBuildOptions, nonInteractive, noWait, platform, projectDir, resourceClass, message, }) {
|
|
19
20
|
var _a;
|
|
20
21
|
const exp = (0, expoConfig_1.getExpoConfig)(projectDir, { env: buildProfile.env });
|
|
21
22
|
const user = await (0, actions_1.ensureLoggedInAsync)();
|
|
@@ -24,6 +25,7 @@ async function createBuildContextAsync({ buildProfileName, buildProfile, easJson
|
|
|
24
25
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp, { env: buildProfile.env });
|
|
25
26
|
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, platform);
|
|
26
27
|
const accountId = (_a = (0, Account_1.findAccountByName)(user.accounts, accountName)) === null || _a === void 0 ? void 0 : _a.id;
|
|
28
|
+
const runFromCI = getenv_1.default.boolish('CI', false);
|
|
27
29
|
const credentialsCtx = new context_1.CredentialsContext({
|
|
28
30
|
exp,
|
|
29
31
|
nonInteractive,
|
|
@@ -43,6 +45,8 @@ async function createBuildContextAsync({ buildProfileName, buildProfile, easJson
|
|
|
43
45
|
project_id: projectId,
|
|
44
46
|
project_type: workflow,
|
|
45
47
|
...devClientProperties,
|
|
48
|
+
no_wait: noWait,
|
|
49
|
+
run_from_ci: runFromCI,
|
|
46
50
|
};
|
|
47
51
|
events_1.Analytics.logEvent(events_1.BuildEvent.BUILD_COMMAND, trackingCtx);
|
|
48
52
|
const commonContext = {
|
|
@@ -56,6 +60,7 @@ async function createBuildContextAsync({ buildProfileName, buildProfile, easJson
|
|
|
56
60
|
exp,
|
|
57
61
|
localBuildOptions,
|
|
58
62
|
nonInteractive,
|
|
63
|
+
noWait,
|
|
59
64
|
platform,
|
|
60
65
|
projectDir,
|
|
61
66
|
projectId,
|
|
@@ -63,6 +68,8 @@ async function createBuildContextAsync({ buildProfileName, buildProfile, easJson
|
|
|
63
68
|
trackingCtx,
|
|
64
69
|
user,
|
|
65
70
|
workflow,
|
|
71
|
+
message,
|
|
72
|
+
runFromCI,
|
|
66
73
|
};
|
|
67
74
|
if (platform === eas_build_job_1.Platform.ANDROID) {
|
|
68
75
|
const common = commonContext;
|
package/build/build/ios/build.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.prepareIosBuildAsync = exports.createIosContextAsync = void 0;
|
|
4
4
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
5
|
+
const eas_json_1 = require("@expo/eas-json");
|
|
5
6
|
const BuildMutation_1 = require("../../graphql/mutations/BuildMutation");
|
|
6
7
|
const bundleIdentifier_1 = require("../../project/ios/bundleIdentifier");
|
|
7
8
|
const scheme_1 = require("../../project/ios/scheme");
|
|
@@ -13,7 +14,9 @@ const credentials_1 = require("./credentials");
|
|
|
13
14
|
const graphql_2 = require("./graphql");
|
|
14
15
|
const prepareJob_1 = require("./prepareJob");
|
|
15
16
|
const syncProjectConfiguration_1 = require("./syncProjectConfiguration");
|
|
17
|
+
const version_1 = require("./version");
|
|
16
18
|
async function createIosContextAsync(ctx) {
|
|
19
|
+
var _a;
|
|
17
20
|
const { buildProfile } = ctx;
|
|
18
21
|
if (ctx.workflow === eas_build_job_1.Workflow.MANAGED) {
|
|
19
22
|
await (0, bundleIdentifier_1.ensureBundleIdentifierIsDefinedForManagedProjectAsync)(ctx.projectDir, ctx.exp);
|
|
@@ -32,11 +35,21 @@ async function createIosContextAsync(ctx) {
|
|
|
32
35
|
env: buildProfile.env,
|
|
33
36
|
});
|
|
34
37
|
const applicationTarget = (0, target_1.findApplicationTarget)(targets);
|
|
38
|
+
const buildNumberOverride = ((_a = ctx.easJsonCliConfig) === null || _a === void 0 ? void 0 : _a.appVersionSource) === eas_json_1.AppVersionSource.REMOTE
|
|
39
|
+
? await (0, version_1.resolveRemoteBuildNumberAsync)({
|
|
40
|
+
projectDir: ctx.projectDir,
|
|
41
|
+
projectId: ctx.projectId,
|
|
42
|
+
exp: ctx.exp,
|
|
43
|
+
applicationTarget,
|
|
44
|
+
buildProfile,
|
|
45
|
+
})
|
|
46
|
+
: undefined;
|
|
35
47
|
return {
|
|
36
48
|
bundleIdentifier: applicationTarget.bundleIdentifier,
|
|
37
49
|
applicationTarget,
|
|
38
50
|
targets,
|
|
39
51
|
xcodeBuildContext,
|
|
52
|
+
buildNumberOverride,
|
|
40
53
|
};
|
|
41
54
|
}
|
|
42
55
|
exports.createIosContextAsync = createIosContextAsync;
|
|
@@ -47,11 +60,14 @@ async function prepareIosBuildAsync(ctx) {
|
|
|
47
60
|
return (0, credentials_1.ensureIosCredentialsAsync)(ctx, ctx.ios.targets);
|
|
48
61
|
},
|
|
49
62
|
syncProjectConfigurationAsync: async () => {
|
|
63
|
+
var _a;
|
|
50
64
|
await (0, syncProjectConfiguration_1.syncProjectConfigurationAsync)({
|
|
51
65
|
projectDir: ctx.projectDir,
|
|
52
66
|
exp: ctx.exp,
|
|
53
|
-
buildProfile: ctx.buildProfile,
|
|
54
67
|
targets: ctx.ios.targets,
|
|
68
|
+
localAutoIncrement: ((_a = ctx.easJsonCliConfig) === null || _a === void 0 ? void 0 : _a.appVersionSource) === eas_json_1.AppVersionSource.REMOTE
|
|
69
|
+
? false
|
|
70
|
+
: ctx.buildProfile.autoIncrement,
|
|
55
71
|
});
|
|
56
72
|
},
|
|
57
73
|
prepareJobAsync: async (ctx, jobData) => {
|
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
|
|
6
6
|
const graphql_1 = require("../graphql");
|
|
7
7
|
function transformJob(job) {
|
|
8
|
+
var _a;
|
|
8
9
|
return {
|
|
9
10
|
type: (0, graphql_1.transformWorkflow)(job.type),
|
|
10
11
|
projectArchive: (0, graphql_1.transformProjectArchive)(job.projectArchive),
|
|
@@ -14,6 +15,7 @@ function transformJob(job) {
|
|
|
14
15
|
secrets: transformIosSecrets(job.secrets),
|
|
15
16
|
builderEnvironment: job.builderEnvironment,
|
|
16
17
|
cache: job.cache,
|
|
18
|
+
version: ((_a = job.version) === null || _a === void 0 ? void 0 : _a.buildNumber) ? { buildNumber: job.version.buildNumber } : undefined,
|
|
17
19
|
scheme: job.scheme,
|
|
18
20
|
buildConfiguration: job.buildConfiguration,
|
|
19
21
|
artifactPath: job.artifactPath,
|
|
@@ -54,6 +54,11 @@ async function prepareJobAsync(ctx, jobData) {
|
|
|
54
54
|
buildConfiguration: ctx.buildProfile.buildConfiguration,
|
|
55
55
|
artifactPath: ctx.buildProfile.artifactPath,
|
|
56
56
|
username,
|
|
57
|
+
...(ctx.ios.buildNumberOverride && {
|
|
58
|
+
version: {
|
|
59
|
+
buildNumber: ctx.ios.buildNumberOverride,
|
|
60
|
+
},
|
|
61
|
+
}),
|
|
57
62
|
experimental: {
|
|
58
63
|
prebuildCommand: ctx.buildProfile.prebuildCommand,
|
|
59
64
|
},
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
|
-
import {
|
|
3
|
-
import { BuildProfile } from '@expo/eas-json';
|
|
2
|
+
import { IosVersionAutoIncrement } from '@expo/eas-json';
|
|
4
3
|
import { Target } from '../../credentials/ios/types';
|
|
5
|
-
export declare function syncProjectConfigurationAsync({ projectDir, exp,
|
|
4
|
+
export declare function syncProjectConfigurationAsync({ projectDir, exp, targets, localAutoIncrement, }: {
|
|
6
5
|
projectDir: string;
|
|
7
6
|
exp: ExpoConfig;
|
|
8
|
-
buildProfile: BuildProfile<Platform.IOS>;
|
|
9
7
|
targets: Target[];
|
|
8
|
+
localAutoIncrement?: IosVersionAutoIncrement;
|
|
10
9
|
}): Promise<void>;
|
|
@@ -6,10 +6,9 @@ const projectUtils_1 = require("../../project/projectUtils");
|
|
|
6
6
|
const workflow_1 = require("../../project/workflow");
|
|
7
7
|
const UpdatesModule_1 = require("../../update/ios/UpdatesModule");
|
|
8
8
|
const version_1 = require("./version");
|
|
9
|
-
async function syncProjectConfigurationAsync({ projectDir, exp,
|
|
9
|
+
async function syncProjectConfigurationAsync({ projectDir, exp, targets, localAutoIncrement, }) {
|
|
10
10
|
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS);
|
|
11
|
-
const
|
|
12
|
-
const versionBumpStrategy = resolveVersionBumpStrategy(autoIncrement !== null && autoIncrement !== void 0 ? autoIncrement : false);
|
|
11
|
+
const versionBumpStrategy = resolveVersionBumpStrategy(localAutoIncrement !== null && localAutoIncrement !== void 0 ? localAutoIncrement : false);
|
|
13
12
|
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
14
13
|
if ((0, projectUtils_1.isExpoUpdatesInstalled)(projectDir)) {
|
|
15
14
|
await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(projectDir, exp);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
|
+
import { Platform } from '@expo/eas-build-job';
|
|
3
|
+
import { BuildProfile } from '@expo/eas-json';
|
|
2
4
|
import type { XCBuildConfiguration } from 'xcode';
|
|
3
5
|
import { Target } from '../../credentials/ios/types';
|
|
4
6
|
export declare enum BumpStrategy {
|
|
@@ -31,3 +33,14 @@ export declare function updateNativeVersionsAsync({ projectDir, version, buildNu
|
|
|
31
33
|
targets: Target[];
|
|
32
34
|
}): Promise<void>;
|
|
33
35
|
export declare function evaluateTemplateString(s: string, buildSettings: XCBuildConfiguration['buildSettings']): string;
|
|
36
|
+
/**
|
|
37
|
+
* Returns buildNumber that will be used for the next build. If current build profile
|
|
38
|
+
* has an 'autoIncrement' option set, it increments the version on server.
|
|
39
|
+
*/
|
|
40
|
+
export declare function resolveRemoteBuildNumberAsync({ projectDir, projectId, exp, applicationTarget, buildProfile, }: {
|
|
41
|
+
projectDir: string;
|
|
42
|
+
projectId: string;
|
|
43
|
+
exp: ExpoConfig;
|
|
44
|
+
applicationTarget: Target;
|
|
45
|
+
buildProfile: BuildProfile<Platform.IOS>;
|
|
46
|
+
}): Promise<string>;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.evaluateTemplateString = exports.updateNativeVersionsAsync = exports.getInfoPlistPath = exports.maybeResolveVersionsAsync = exports.readBuildNumberAsync = exports.readShortVersionAsync = exports.bumpVersionInAppJsonAsync = exports.bumpVersionAsync = exports.BumpStrategy = void 0;
|
|
3
|
+
exports.resolveRemoteBuildNumberAsync = exports.evaluateTemplateString = exports.updateNativeVersionsAsync = exports.getInfoPlistPath = exports.maybeResolveVersionsAsync = exports.readBuildNumberAsync = exports.readShortVersionAsync = exports.bumpVersionInAppJsonAsync = exports.bumpVersionAsync = exports.BumpStrategy = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
6
6
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
7
7
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
8
8
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
9
|
+
const generated_1 = require("../../graphql/generated");
|
|
10
|
+
const AppVersionMutation_1 = require("../../graphql/mutations/AppVersionMutation");
|
|
11
|
+
const AppVersionQuery_1 = require("../../graphql/queries/AppVersionQuery");
|
|
9
12
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
13
|
+
const ora_1 = require("../../ora");
|
|
10
14
|
const target_1 = require("../../project/ios/target");
|
|
11
15
|
const versions_1 = require("../../project/ios/versions");
|
|
12
16
|
const workflow_1 = require("../../project/workflow");
|
|
@@ -186,3 +190,70 @@ function evaluateTemplateString(s, buildSettings) {
|
|
|
186
190
|
});
|
|
187
191
|
}
|
|
188
192
|
exports.evaluateTemplateString = evaluateTemplateString;
|
|
193
|
+
/**
|
|
194
|
+
* Returns buildNumber that will be used for the next build. If current build profile
|
|
195
|
+
* has an 'autoIncrement' option set, it increments the version on server.
|
|
196
|
+
*/
|
|
197
|
+
async function resolveRemoteBuildNumberAsync({ projectDir, projectId, exp, applicationTarget, buildProfile, }) {
|
|
198
|
+
var _a, _b, _c, _d;
|
|
199
|
+
const remoteVersions = await AppVersionQuery_1.AppVersionQuery.latestVersionAsync(projectId, generated_1.AppPlatform.Ios, applicationTarget.bundleIdentifier);
|
|
200
|
+
const localBuildNumber = await readBuildNumberAsync(projectDir, exp, (_a = applicationTarget.buildSettings) !== null && _a !== void 0 ? _a : {});
|
|
201
|
+
const localShortVersion = await readShortVersionAsync(projectDir, exp, (_b = applicationTarget.buildSettings) !== null && _b !== void 0 ? _b : {});
|
|
202
|
+
let currentBuildVersion;
|
|
203
|
+
if (remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion) {
|
|
204
|
+
currentBuildVersion = remoteVersions.buildVersion;
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
if (localBuildNumber) {
|
|
208
|
+
log_1.default.warn('No remote versions are configured for this project, buildNumber will be initialized based on the value from the local project.');
|
|
209
|
+
currentBuildVersion = localBuildNumber;
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
log_1.default.error(`Remote versions are not configured and EAS CLI was not able to read the current version from your project. Use "eas build:version:set" to initialize remote versions.`);
|
|
213
|
+
throw new Error('Remote versions are not configured.');
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
if (!buildProfile.autoIncrement && (remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion)) {
|
|
217
|
+
return currentBuildVersion;
|
|
218
|
+
}
|
|
219
|
+
else if (!buildProfile.autoIncrement && !(remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion)) {
|
|
220
|
+
const spinner = (0, ora_1.ora)(`Initializing buildNumber with ${chalk_1.default.bold(currentBuildVersion)}.`).start();
|
|
221
|
+
try {
|
|
222
|
+
await AppVersionMutation_1.AppVersionMutation.createAppVersionAsync({
|
|
223
|
+
appId: projectId,
|
|
224
|
+
platform: generated_1.AppPlatform.Ios,
|
|
225
|
+
applicationIdentifier: applicationTarget.bundleIdentifier,
|
|
226
|
+
storeVersion: localShortVersion !== null && localShortVersion !== void 0 ? localShortVersion : '1.0.0',
|
|
227
|
+
buildVersion: currentBuildVersion,
|
|
228
|
+
runtimeVersion: (_c = config_plugins_1.Updates.getRuntimeVersionNullable(exp, eas_build_job_1.Platform.IOS)) !== null && _c !== void 0 ? _c : undefined,
|
|
229
|
+
});
|
|
230
|
+
spinner.succeed(`Initialized buildNumber with ${chalk_1.default.bold(currentBuildVersion)}.`);
|
|
231
|
+
}
|
|
232
|
+
catch (err) {
|
|
233
|
+
spinner.fail(`Failed to initialize buildNumber with ${chalk_1.default.bold(currentBuildVersion)}.`);
|
|
234
|
+
throw err;
|
|
235
|
+
}
|
|
236
|
+
return currentBuildVersion;
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
const nextBuildVersion = (0, versions_1.getNextBuildNumber)(currentBuildVersion);
|
|
240
|
+
const spinner = (0, ora_1.ora)(`Incrementing buildNumber from ${chalk_1.default.bold(currentBuildVersion)} to ${chalk_1.default.bold(nextBuildVersion)}.`).start();
|
|
241
|
+
try {
|
|
242
|
+
await AppVersionMutation_1.AppVersionMutation.createAppVersionAsync({
|
|
243
|
+
appId: projectId,
|
|
244
|
+
platform: generated_1.AppPlatform.Ios,
|
|
245
|
+
applicationIdentifier: applicationTarget.bundleIdentifier,
|
|
246
|
+
storeVersion: localShortVersion !== null && localShortVersion !== void 0 ? localShortVersion : '1.0.0',
|
|
247
|
+
buildVersion: nextBuildVersion,
|
|
248
|
+
runtimeVersion: (_d = config_plugins_1.Updates.getRuntimeVersionNullable(exp, eas_build_job_1.Platform.IOS)) !== null && _d !== void 0 ? _d : undefined,
|
|
249
|
+
});
|
|
250
|
+
spinner.succeed(`Incremented buildNumber from ${chalk_1.default.bold(currentBuildVersion)} to ${chalk_1.default.bold(nextBuildVersion)}.`);
|
|
251
|
+
}
|
|
252
|
+
catch (err) {
|
|
253
|
+
spinner.fail(`Failed to increment buildNumber from ${chalk_1.default.bold(currentBuildVersion)} to ${chalk_1.default.bold(nextBuildVersion)}.`);
|
|
254
|
+
throw err;
|
|
255
|
+
}
|
|
256
|
+
return nextBuildVersion;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
exports.resolveRemoteBuildNumberAsync = resolveRemoteBuildNumberAsync;
|
package/build/build/local.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Job } from '@expo/eas-build-job';
|
|
1
|
+
import { Job, Metadata } from '@expo/eas-build-job';
|
|
2
2
|
export interface LocalBuildOptions {
|
|
3
3
|
enable: boolean;
|
|
4
4
|
skipCleanup?: boolean;
|
|
@@ -8,4 +8,4 @@ export interface LocalBuildOptions {
|
|
|
8
8
|
workingdir?: string;
|
|
9
9
|
verbose?: boolean;
|
|
10
10
|
}
|
|
11
|
-
export declare function runLocalBuildAsync(job: Job, options: LocalBuildOptions): Promise<void>;
|
|
11
|
+
export declare function runLocalBuildAsync(job: Job, metadata: Metadata, options: LocalBuildOptions): Promise<void>;
|
package/build/build/local.js
CHANGED
|
@@ -6,10 +6,10 @@ const spawn_async_1 = tslib_1.__importDefault(require("@expo/spawn-async"));
|
|
|
6
6
|
const semver_1 = tslib_1.__importDefault(require("semver"));
|
|
7
7
|
const ora_1 = require("../ora");
|
|
8
8
|
const PLUGIN_PACKAGE_NAME = 'eas-cli-local-build-plugin';
|
|
9
|
-
const PLUGIN_PACKAGE_VERSION = '0.0.
|
|
10
|
-
async function runLocalBuildAsync(job, options) {
|
|
9
|
+
const PLUGIN_PACKAGE_VERSION = '0.0.99';
|
|
10
|
+
async function runLocalBuildAsync(job, metadata, options) {
|
|
11
11
|
var _a;
|
|
12
|
-
const { command, args } = await getCommandAndArgsAsync(job);
|
|
12
|
+
const { command, args } = await getCommandAndArgsAsync(job, metadata);
|
|
13
13
|
let spinner;
|
|
14
14
|
if (!options.verbose) {
|
|
15
15
|
spinner = (0, ora_1.ora)().start(options.skipNativeBuild ? 'Preparing project' : 'Building project');
|
|
@@ -44,16 +44,16 @@ async function runLocalBuildAsync(job, options) {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
exports.runLocalBuildAsync = runLocalBuildAsync;
|
|
47
|
-
async function getCommandAndArgsAsync(job) {
|
|
48
|
-
const
|
|
47
|
+
async function getCommandAndArgsAsync(job, metadata) {
|
|
48
|
+
const jobAndMetadataBase64 = Buffer.from(JSON.stringify({ job, metadata })).toString('base64');
|
|
49
49
|
if (process.env.EAS_LOCAL_BUILD_PLUGIN_PATH) {
|
|
50
50
|
return {
|
|
51
51
|
command: process.env.EAS_LOCAL_BUILD_PLUGIN_PATH,
|
|
52
|
-
args: [
|
|
52
|
+
args: [jobAndMetadataBase64],
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
else {
|
|
56
|
-
const args = [`${PLUGIN_PACKAGE_NAME}@${PLUGIN_PACKAGE_VERSION}`,
|
|
56
|
+
const args = [`${PLUGIN_PACKAGE_NAME}@${PLUGIN_PACKAGE_VERSION}`, jobAndMetadataBase64];
|
|
57
57
|
if (await isAtLeastNpm7Async()) {
|
|
58
58
|
// npx shipped with npm >= 7.0.0 requires the "-y" flag to run commands without
|
|
59
59
|
// prompting the user to install a package that is used for the first time
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { Metadata, Platform } from '@expo/eas-build-job';
|
|
2
2
|
import { BuildContext } from './context';
|
|
3
3
|
export declare function collectMetadataAsync<T extends Platform>(ctx: BuildContext<T>): Promise<Metadata>;
|
|
4
|
+
export declare function truncateGitCommitMessage(msg: string | undefined, maxLength?: number): string | undefined;
|
package/build/build/metadata.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.collectMetadataAsync = void 0;
|
|
3
|
+
exports.truncateGitCommitMessage = exports.collectMetadataAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
6
6
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
@@ -16,7 +16,8 @@ const vcs_1 = require("../vcs");
|
|
|
16
16
|
const version_1 = require("./android/version");
|
|
17
17
|
const version_2 = require("./ios/version");
|
|
18
18
|
async function collectMetadataAsync(ctx) {
|
|
19
|
-
var _a, _b;
|
|
19
|
+
var _a, _b, _c;
|
|
20
|
+
const vcsClient = (0, vcs_1.getVcsClient)();
|
|
20
21
|
const channelOrReleaseChannel = await resolveChannelOrReleaseChannelAsync(ctx);
|
|
21
22
|
const distribution = (_a = ('simulator' in ctx.buildProfile && ctx.buildProfile.simulator
|
|
22
23
|
? 'simulator'
|
|
@@ -35,12 +36,16 @@ async function collectMetadataAsync(ctx) {
|
|
|
35
36
|
appName: ctx.exp.name,
|
|
36
37
|
appIdentifier: resolveAppIdentifier(ctx),
|
|
37
38
|
buildProfile: ctx.buildProfileName,
|
|
38
|
-
gitCommitHash: await
|
|
39
|
-
|
|
39
|
+
gitCommitHash: await vcsClient.getCommitHashAsync(),
|
|
40
|
+
gitCommitMessage: truncateGitCommitMessage((_c = (await vcsClient.getLastCommitMessageAsync())) !== null && _c !== void 0 ? _c : undefined),
|
|
41
|
+
isGitWorkingTreeDirty: await vcsClient.hasUncommittedChangesAsync(),
|
|
40
42
|
username: (0, projectUtils_1.getUsername)(ctx.exp, await (0, actions_1.ensureLoggedInAsync)()),
|
|
43
|
+
message: ctx.message,
|
|
41
44
|
...(ctx.platform === eas_build_job_1.Platform.IOS && {
|
|
42
45
|
iosEnterpriseProvisioning: resolveIosEnterpriseProvisioning(ctx),
|
|
43
46
|
}),
|
|
47
|
+
runWithNoWaitFlag: ctx.noWait,
|
|
48
|
+
runFromCI: ctx.runFromCI,
|
|
44
49
|
};
|
|
45
50
|
return (0, eas_build_job_1.sanitizeMetadata)(metadata);
|
|
46
51
|
}
|
|
@@ -48,11 +53,25 @@ exports.collectMetadataAsync = collectMetadataAsync;
|
|
|
48
53
|
async function maybeResolveVersionsAsync(ctx) {
|
|
49
54
|
if (ctx.platform === eas_build_job_1.Platform.IOS) {
|
|
50
55
|
const iosContext = ctx;
|
|
51
|
-
|
|
56
|
+
const resolvedVersion = await (0, version_2.maybeResolveVersionsAsync)(ctx.projectDir, ctx.exp, iosContext.ios.targets);
|
|
57
|
+
if (iosContext.ios.buildNumberOverride) {
|
|
58
|
+
return {
|
|
59
|
+
...resolvedVersion,
|
|
60
|
+
appBuildVersion: iosContext.ios.buildNumberOverride,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
return resolvedVersion;
|
|
52
64
|
}
|
|
53
65
|
else if (ctx.platform === eas_build_job_1.Platform.ANDROID) {
|
|
54
66
|
const androidCtx = ctx;
|
|
55
|
-
|
|
67
|
+
const resolvedVersion = await (0, version_1.maybeResolveVersionsAsync)(ctx.projectDir, ctx.exp, androidCtx.buildProfile);
|
|
68
|
+
if (androidCtx.android.versionCodeOverride) {
|
|
69
|
+
return {
|
|
70
|
+
...resolvedVersion,
|
|
71
|
+
appBuildVersion: androidCtx.android.versionCodeOverride,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
return resolvedVersion;
|
|
56
75
|
}
|
|
57
76
|
else {
|
|
58
77
|
throw new Error(`Unsupported platform ${ctx.platform}`);
|
|
@@ -122,3 +141,10 @@ async function getReactNativeVersionAsync(ctx) {
|
|
|
122
141
|
function resolveIosEnterpriseProvisioning(ctx) {
|
|
123
142
|
return ctx.buildProfile.enterpriseProvisioning;
|
|
124
143
|
}
|
|
144
|
+
function truncateGitCommitMessage(msg, maxLength = 4096) {
|
|
145
|
+
if (msg === undefined) {
|
|
146
|
+
return undefined;
|
|
147
|
+
}
|
|
148
|
+
return msg.length > maxLength ? `${msg.substring(0, maxLength - 3)}...` : msg;
|
|
149
|
+
}
|
|
150
|
+
exports.truncateGitCommitMessage = truncateGitCommitMessage;
|
|
@@ -12,5 +12,6 @@ export interface BuildFlags {
|
|
|
12
12
|
submitProfile?: string;
|
|
13
13
|
localBuildOptions: LocalBuildOptions;
|
|
14
14
|
userInputResourceClass?: UserInputResourceClass;
|
|
15
|
+
message?: string;
|
|
15
16
|
}
|
|
16
17
|
export declare function runBuildAndSubmitAsync(projectDir: string, flags: BuildFlags): Promise<void>;
|