eas-cli-local-build-plugin 0.0.86 → 0.0.89

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/android.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { Android } from '@expo/eas-build-job';
2
2
  import { BuildParams } from './types';
3
- export declare function buildAndroidAsync(job: Android.Job, { workingdir, env }: BuildParams): Promise<string | undefined>;
3
+ export declare function buildAndroidAsync(job: Android.Job, { workingdir, env: baseEnv }: BuildParams): Promise<string | undefined>;
package/dist/android.js CHANGED
@@ -34,12 +34,16 @@ const logger_1 = __importStar(require("./logger"));
34
34
  const buildArtifact_1 = require("./buildArtifact");
35
35
  const config_1 = __importDefault(require("./config"));
36
36
  const expoCli_1 = require("./expoCli");
37
- async function buildAndroidAsync(job, { workingdir, env }) {
37
+ async function buildAndroidAsync(job, { workingdir, env: baseEnv }) {
38
+ var _a, _b;
39
+ const versionName = (_a = job.version) === null || _a === void 0 ? void 0 : _a.versionName;
40
+ const versionCode = (_b = job.version) === null || _b === void 0 ? void 0 : _b.versionCode;
41
+ const env = Object.assign(Object.assign(Object.assign({}, baseEnv), (versionCode && { EAS_BUILD_ANDROID_VERSION_CODE: versionCode })), (versionName && { EAS_BUILD_ANDROID_VERSION_NAME: versionName }));
38
42
  const ctx = new build_tools_1.BuildContext(job, {
39
43
  workingdir,
40
44
  logger: logger_1.default,
41
45
  logBuffer: logger_1.logBuffer,
42
- runExpoCliCommand: expoCli_1.runExpoCliCommandAsync,
46
+ runGlobalExpoCliCommand: expoCli_1.runGlobalExpoCliCommandAsync,
43
47
  env,
44
48
  skipNativeBuild: config_1.default.skipNativeBuild,
45
49
  });
@@ -1 +1 @@
1
- {"version":3,"file":"android.js","sourceRoot":"","sources":["../src/android.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAA0D;AAC1D,mDAA2D;AAC3D,uDAA+B;AAE/B,mDAA6C;AAE7C,mDAAuD;AACvD,sDAA8B;AAC9B,uCAAmD;AAE5C,KAAK,UAAU,iBAAiB,CACrC,GAAgB,EAChB,EAAE,UAAU,EAAE,GAAG,EAAe;IAEhC,MAAM,GAAG,GAAG,IAAI,0BAAY,CAAc,GAAG,EAAE;QAC7C,UAAU;QACV,MAAM,EAAN,gBAAM;QACN,SAAS,EAAT,kBAAS;QACT,iBAAiB,EAAE,gCAAsB;QACzC,GAAG;QACH,eAAe,EAAE,gBAAM,CAAC,eAAe;KACxC,CAAC,CAAC;IAEH,MAAM,GAAG,CAAC,aAAa,CAAC,0BAAU,CAAC,WAAW,EAAE,KAAK,IAAI,EAAE;QACzD,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAA,cAAI,EAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;IAEH,MAAM,aAAa,GAAG,MAAM,sBAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;IAEzD,OAAO,MAAM,IAAA,oCAAoB,EAAC,GAAG,EAAE,aAAa,CAAC,CAAC;AACxD,CAAC;AApBD,8CAoBC","sourcesContent":["import { Android, BuildPhase } from '@expo/eas-build-job';\nimport { Builders, BuildContext } from '@expo/build-tools';\nimport omit from 'lodash/omit';\n\nimport logger, { logBuffer } from './logger';\nimport { BuildParams } from './types';\nimport { prepareBuildArtifact } from './buildArtifact';\nimport config from './config';\nimport { runExpoCliCommandAsync } from './expoCli';\n\nexport async function buildAndroidAsync(\n job: Android.Job,\n { workingdir, env }: BuildParams\n): Promise<string | undefined> {\n const ctx = new BuildContext<Android.Job>(job, {\n workingdir,\n logger,\n logBuffer,\n runExpoCliCommand: runExpoCliCommandAsync,\n env,\n skipNativeBuild: config.skipNativeBuild,\n });\n\n await ctx.runBuildPhase(BuildPhase.START_BUILD, async () => {\n ctx.logger.info({ job: omit(ctx.job, 'secrets') }, 'Starting build');\n });\n\n const artifactPaths = await Builders.androidBuilder(ctx);\n\n return await prepareBuildArtifact(ctx, artifactPaths);\n}\n"]}
1
+ {"version":3,"file":"android.js","sourceRoot":"","sources":["../src/android.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAA+D;AAC/D,mDAA2D;AAC3D,uDAA+B;AAE/B,mDAA6C;AAE7C,mDAAuD;AACvD,sDAA8B;AAC9B,uCAAyD;AAElD,KAAK,UAAU,iBAAiB,CACrC,GAAgB,EAChB,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,EAAe;;IAEzC,MAAM,WAAW,GAAG,MAAA,GAAG,CAAC,OAAO,0CAAE,WAAW,CAAC;IAC7C,MAAM,WAAW,GAAG,MAAA,GAAG,CAAC,OAAO,0CAAE,WAAW,CAAC;IAC7C,MAAM,GAAG,iDACJ,OAAO,GACP,CAAC,WAAW,IAAI,EAAE,8BAA8B,EAAE,WAAW,EAAE,CAAC,GAChE,CAAC,WAAW,IAAI,EAAE,8BAA8B,EAAE,WAAW,EAAE,CAAC,CACpE,CAAC;IACF,MAAM,GAAG,GAAG,IAAI,0BAAY,CAAc,GAAG,EAAE;QAC7C,UAAU;QACV,MAAM,EAAN,gBAAM;QACN,SAAS,EAAT,kBAAS;QACT,uBAAuB,EAAE,sCAA4B;QACrD,GAAG;QACH,eAAe,EAAE,gBAAM,CAAC,eAAe;KACxC,CAAC,CAAC;IAEH,MAAM,GAAG,CAAC,aAAa,CAAC,0BAAU,CAAC,WAAW,EAAE,KAAK,IAAI,EAAE;QACzD,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAA,cAAI,EAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;IAEH,MAAM,aAAa,GAAG,MAAM,sBAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;IAEzD,OAAO,MAAM,IAAA,oCAAoB,EAAC,GAAG,EAAE,aAAa,CAAC,CAAC;AACxD,CAAC;AA3BD,8CA2BC","sourcesContent":["import { Android, BuildPhase, Env } from '@expo/eas-build-job';\nimport { Builders, BuildContext } from '@expo/build-tools';\nimport omit from 'lodash/omit';\n\nimport logger, { logBuffer } from './logger';\nimport { BuildParams } from './types';\nimport { prepareBuildArtifact } from './buildArtifact';\nimport config from './config';\nimport { runGlobalExpoCliCommandAsync } from './expoCli';\n\nexport async function buildAndroidAsync(\n job: Android.Job,\n { workingdir, env: baseEnv }: BuildParams\n): Promise<string | undefined> {\n const versionName = job.version?.versionName;\n const versionCode = job.version?.versionCode;\n const env: Env = {\n ...baseEnv,\n ...(versionCode && { EAS_BUILD_ANDROID_VERSION_CODE: versionCode }),\n ...(versionName && { EAS_BUILD_ANDROID_VERSION_NAME: versionName }),\n };\n const ctx = new BuildContext<Android.Job>(job, {\n workingdir,\n logger,\n logBuffer,\n runGlobalExpoCliCommand: runGlobalExpoCliCommandAsync,\n env,\n skipNativeBuild: config.skipNativeBuild,\n });\n\n await ctx.runBuildPhase(BuildPhase.START_BUILD, async () => {\n ctx.logger.info({ job: omit(ctx.job, 'secrets') }, 'Starting build');\n });\n\n const artifactPaths = await Builders.androidBuilder(ctx);\n\n return await prepareBuildArtifact(ctx, artifactPaths);\n}\n"]}
package/dist/build.js CHANGED
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.buildAsync = void 0;
7
+ const path_1 = __importDefault(require("path"));
7
8
  const eas_build_job_1 = require("@expo/eas-build-job");
8
9
  const pickBy_1 = __importDefault(require("lodash/pickBy"));
9
10
  const fs_extra_1 = __importDefault(require("fs-extra"));
@@ -17,7 +18,7 @@ async function buildAsync(job) {
17
18
  var _a;
18
19
  const workingdir = await (0, workingdir_1.prepareWorkingdirAsync)();
19
20
  try {
20
- const env = Object.assign(Object.assign(Object.assign({}, (0, pickBy_1.default)(process.env, (val) => !!val)), (_a = job.builderEnvironment) === null || _a === void 0 ? void 0 : _a.env), { EAS_BUILD: '1' });
21
+ const env = Object.assign(Object.assign(Object.assign({}, (0, pickBy_1.default)(process.env, (val) => !!val)), (_a = job.builderEnvironment) === null || _a === void 0 ? void 0 : _a.env), { EAS_BUILD: '1', EAS_BUILD_WORKINGDIR: path_1.default.join(workingdir, 'build') });
21
22
  let artifactPath;
22
23
  switch (job.platform) {
23
24
  case eas_build_job_1.Platform.ANDROID: {
package/dist/build.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"build.js","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":";;;;;;AAAA,uDAAuE;AACvE,2DAAmC;AACnC,wDAA0B;AAC1B,kDAA0B;AAC1B,mDAAyD;AAEzD,uCAA8C;AAC9C,sDAA8B;AAC9B,+BAAsC;AACtC,6CAAsD;AAE/C,KAAK,UAAU,UAAU,CAAC,GAAQ;;IACvC,MAAM,UAAU,GAAG,MAAM,IAAA,mCAAsB,GAAE,CAAC;IAElD,IAAI;QACF,MAAM,GAAG,iDACJ,IAAA,gBAAM,EAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAY,EAAiB,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAC3D,MAAA,GAAG,CAAC,kBAAkB,0CAAE,GAAG,KAC9B,SAAS,EAAE,GAAG,GACf,CAAC;QACF,IAAI,YAAgC,CAAC;QACrC,QAAQ,GAAG,CAAC,QAAQ,EAAE;YACpB,KAAK,wBAAQ,CAAC,OAAO,CAAC,CAAC;gBACrB,YAAY,GAAG,MAAM,IAAA,2BAAiB,EAAC,GAAG,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC;gBACjE,MAAM;aACP;YACD,KAAK,wBAAQ,CAAC,GAAG,CAAC,CAAC;gBACjB,YAAY,GAAG,MAAM,IAAA,mBAAa,EAAC,GAAG,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC;gBAC7D,MAAM;aACP;SACF;QACD,IAAI,CAAC,gBAAM,CAAC,eAAe,EAAE;YAC3B,OAAO,CAAC,GAAG,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC;YAC7C,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,uCAAuC,YAAY,EAAE,CAAC,CAAC,CAAC;SACjF;KACF;IAAC,OAAO,CAAM,EAAE;QACf,IAAI,CAAC,YAAY,kCAAoB,EAAE;YACrC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;YACvB,OAAO;SACR;QACD,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;QACzC,IAAI,gBAAM,CAAC,MAAM,CAAC,KAAK,KAAK,OAAO,EAAE;YACnC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;SAC7B;QACD,MAAM,CAAC,CAAC;KACT;YAAS;QACR,IAAI,CAAC,gBAAM,CAAC,WAAW,EAAE;YACvB,MAAM,kBAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;SAC7B;aAAM;YACL,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,MAAM,CAAC,qBAAqB,UAAU,oBAAoB,CAAC,CAAC,CAAC;SAClF;QACD,IAAI,GAAG,CAAC,cAAc,CAAC,IAAI,KAAK,iCAAiB,CAAC,IAAI,EAAE;YACtD,MAAM,kBAAE,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;SAC1C;KACF;AACH,CAAC;AA9CD,gCA8CC","sourcesContent":["import { Job, Platform, ArchiveSourceType } from '@expo/eas-build-job';\nimport pickBy from 'lodash/pickBy';\nimport fs from 'fs-extra';\nimport chalk from 'chalk';\nimport { SkipNativeBuildError } from '@expo/build-tools';\n\nimport { buildAndroidAsync } from './android';\nimport config from './config';\nimport { buildIosAsync } from './ios';\nimport { prepareWorkingdirAsync } from './workingdir';\n\nexport async function buildAsync(job: Job): Promise<void> {\n const workingdir = await prepareWorkingdirAsync();\n\n try {\n const env = {\n ...pickBy(process.env, (val?: string): val is string => !!val),\n ...job.builderEnvironment?.env,\n EAS_BUILD: '1',\n };\n let artifactPath: string | undefined;\n switch (job.platform) {\n case Platform.ANDROID: {\n artifactPath = await buildAndroidAsync(job, { env, workingdir });\n break;\n }\n case Platform.IOS: {\n artifactPath = await buildIosAsync(job, { env, workingdir });\n break;\n }\n }\n if (!config.skipNativeBuild) {\n console.log();\n console.log(chalk.green('Build successful'));\n console.log(chalk.green(`You can find the build artifacts in ${artifactPath}`));\n }\n } catch (e: any) {\n if (e instanceof SkipNativeBuildError) {\n console.log(e.message);\n return;\n }\n console.error();\n console.error(chalk.red(`Build failed`));\n if (config.logger.level === 'debug') {\n console.error(e.innerError);\n }\n throw e;\n } finally {\n if (!config.skipCleanup) {\n await fs.remove(workingdir);\n } else {\n console.error(chalk.yellow(`Skipping cleanup, ${workingdir} won't be removed.`));\n }\n if (job.projectArchive.type === ArchiveSourceType.PATH) {\n await fs.remove(job.projectArchive.path);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"build.js","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,uDAAuE;AACvE,2DAAmC;AACnC,wDAA0B;AAC1B,kDAA0B;AAC1B,mDAAyD;AAEzD,uCAA8C;AAC9C,sDAA8B;AAC9B,+BAAsC;AACtC,6CAAsD;AAE/C,KAAK,UAAU,UAAU,CAAC,GAAQ;;IACvC,MAAM,UAAU,GAAG,MAAM,IAAA,mCAAsB,GAAE,CAAC;IAElD,IAAI;QACF,MAAM,GAAG,iDACJ,IAAA,gBAAM,EAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAY,EAAiB,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAC3D,MAAA,GAAG,CAAC,kBAAkB,0CAAE,GAAG,KAC9B,SAAS,EAAE,GAAG,EACd,oBAAoB,EAAE,cAAI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,GACrD,CAAC;QACF,IAAI,YAAgC,CAAC;QACrC,QAAQ,GAAG,CAAC,QAAQ,EAAE;YACpB,KAAK,wBAAQ,CAAC,OAAO,CAAC,CAAC;gBACrB,YAAY,GAAG,MAAM,IAAA,2BAAiB,EAAC,GAAG,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC;gBACjE,MAAM;aACP;YACD,KAAK,wBAAQ,CAAC,GAAG,CAAC,CAAC;gBACjB,YAAY,GAAG,MAAM,IAAA,mBAAa,EAAC,GAAG,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC;gBAC7D,MAAM;aACP;SACF;QACD,IAAI,CAAC,gBAAM,CAAC,eAAe,EAAE;YAC3B,OAAO,CAAC,GAAG,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC;YAC7C,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,uCAAuC,YAAY,EAAE,CAAC,CAAC,CAAC;SACjF;KACF;IAAC,OAAO,CAAM,EAAE;QACf,IAAI,CAAC,YAAY,kCAAoB,EAAE;YACrC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;YACvB,OAAO;SACR;QACD,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;QACzC,IAAI,gBAAM,CAAC,MAAM,CAAC,KAAK,KAAK,OAAO,EAAE;YACnC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;SAC7B;QACD,MAAM,CAAC,CAAC;KACT;YAAS;QACR,IAAI,CAAC,gBAAM,CAAC,WAAW,EAAE;YACvB,MAAM,kBAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;SAC7B;aAAM;YACL,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,MAAM,CAAC,qBAAqB,UAAU,oBAAoB,CAAC,CAAC,CAAC;SAClF;QACD,IAAI,GAAG,CAAC,cAAc,CAAC,IAAI,KAAK,iCAAiB,CAAC,IAAI,EAAE;YACtD,MAAM,kBAAE,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;SAC1C;KACF;AACH,CAAC;AA/CD,gCA+CC","sourcesContent":["import path from 'path';\n\nimport { Job, Platform, ArchiveSourceType } from '@expo/eas-build-job';\nimport pickBy from 'lodash/pickBy';\nimport fs from 'fs-extra';\nimport chalk from 'chalk';\nimport { SkipNativeBuildError } from '@expo/build-tools';\n\nimport { buildAndroidAsync } from './android';\nimport config from './config';\nimport { buildIosAsync } from './ios';\nimport { prepareWorkingdirAsync } from './workingdir';\n\nexport async function buildAsync(job: Job): Promise<void> {\n const workingdir = await prepareWorkingdirAsync();\n\n try {\n const env = {\n ...pickBy(process.env, (val?: string): val is string => !!val),\n ...job.builderEnvironment?.env,\n EAS_BUILD: '1',\n EAS_BUILD_WORKINGDIR: path.join(workingdir, 'build'),\n };\n let artifactPath: string | undefined;\n switch (job.platform) {\n case Platform.ANDROID: {\n artifactPath = await buildAndroidAsync(job, { env, workingdir });\n break;\n }\n case Platform.IOS: {\n artifactPath = await buildIosAsync(job, { env, workingdir });\n break;\n }\n }\n if (!config.skipNativeBuild) {\n console.log();\n console.log(chalk.green('Build successful'));\n console.log(chalk.green(`You can find the build artifacts in ${artifactPath}`));\n }\n } catch (e: any) {\n if (e instanceof SkipNativeBuildError) {\n console.log(e.message);\n return;\n }\n console.error();\n console.error(chalk.red(`Build failed`));\n if (config.logger.level === 'debug') {\n console.error(e.innerError);\n }\n throw e;\n } finally {\n if (!config.skipCleanup) {\n await fs.remove(workingdir);\n } else {\n console.error(chalk.yellow(`Skipping cleanup, ${workingdir} won't be removed.`));\n }\n if (job.projectArchive.type === ArchiveSourceType.PATH) {\n await fs.remove(job.projectArchive.path);\n }\n }\n}\n"]}
package/dist/expoCli.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  import { SpawnOptions, SpawnPromise, SpawnResult } from '@expo/turtle-spawn';
2
- export declare function runExpoCliCommandAsync(command: string, options: SpawnOptions): SpawnPromise<SpawnResult>;
2
+ export declare function runGlobalExpoCliCommandAsync(command: string, options: SpawnOptions): SpawnPromise<SpawnResult>;
package/dist/expoCli.js CHANGED
@@ -3,15 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.runExpoCliCommandAsync = void 0;
6
+ exports.runGlobalExpoCliCommandAsync = void 0;
7
7
  const path_1 = __importDefault(require("path"));
8
8
  const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
9
9
  const expoCliPackage = require.resolve('expo-cli');
10
- function runExpoCliCommandAsync(command, options) {
10
+ function runGlobalExpoCliCommandAsync(command, options) {
11
11
  var _a, _b;
12
12
  const expoCliBinPath = (_a = process.env.EXPO_CLI_PATH) !== null && _a !== void 0 ? _a : path_1.default.resolve(path_1.default.dirname(expoCliPackage), '../bin/expo.js');
13
13
  (_b = options === null || options === void 0 ? void 0 : options.logger) === null || _b === void 0 ? void 0 : _b.debug(`${expoCliBinPath} ${command}`);
14
14
  return (0, turtle_spawn_1.default)('bash', ['-c', `${expoCliBinPath} ${command}`], options);
15
15
  }
16
- exports.runExpoCliCommandAsync = runExpoCliCommandAsync;
16
+ exports.runGlobalExpoCliCommandAsync = runGlobalExpoCliCommandAsync;
17
17
  //# sourceMappingURL=expoCli.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"expoCli.js","sourceRoot":"","sources":["../src/expoCli.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,sEAAyF;AAEzF,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAEnD,SAAgB,sBAAsB,CACpC,OAAe,EACf,OAAqB;;IAErB,MAAM,cAAc,GAClB,MAAA,OAAO,CAAC,GAAG,CAAC,aAAa,mCAAI,cAAI,CAAC,OAAO,CAAC,cAAI,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,gBAAgB,CAAC,CAAC;IAC5F,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,0CAAE,KAAK,CAAC,GAAG,cAAc,IAAI,OAAO,EAAE,CAAC,CAAC;IACvD,OAAO,IAAA,sBAAU,EAAC,MAAM,EAAE,CAAC,IAAI,EAAE,GAAG,cAAc,IAAI,OAAO,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;AAC7E,CAAC;AARD,wDAQC","sourcesContent":["import path from 'path';\n\nimport spawnAsync, { SpawnOptions, SpawnPromise, SpawnResult } from '@expo/turtle-spawn';\n\nconst expoCliPackage = require.resolve('expo-cli');\n\nexport function runExpoCliCommandAsync(\n command: string,\n options: SpawnOptions\n): SpawnPromise<SpawnResult> {\n const expoCliBinPath =\n process.env.EXPO_CLI_PATH ?? path.resolve(path.dirname(expoCliPackage), '../bin/expo.js');\n options?.logger?.debug(`${expoCliBinPath} ${command}`);\n return spawnAsync('bash', ['-c', `${expoCliBinPath} ${command}`], options);\n}\n"]}
1
+ {"version":3,"file":"expoCli.js","sourceRoot":"","sources":["../src/expoCli.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,sEAAyF;AAEzF,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAEnD,SAAgB,4BAA4B,CAC1C,OAAe,EACf,OAAqB;;IAErB,MAAM,cAAc,GAClB,MAAA,OAAO,CAAC,GAAG,CAAC,aAAa,mCAAI,cAAI,CAAC,OAAO,CAAC,cAAI,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,gBAAgB,CAAC,CAAC;IAC5F,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,0CAAE,KAAK,CAAC,GAAG,cAAc,IAAI,OAAO,EAAE,CAAC,CAAC;IACvD,OAAO,IAAA,sBAAU,EAAC,MAAM,EAAE,CAAC,IAAI,EAAE,GAAG,cAAc,IAAI,OAAO,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;AAC7E,CAAC;AARD,oEAQC","sourcesContent":["import path from 'path';\n\nimport spawnAsync, { SpawnOptions, SpawnPromise, SpawnResult } from '@expo/turtle-spawn';\n\nconst expoCliPackage = require.resolve('expo-cli');\n\nexport function runGlobalExpoCliCommandAsync(\n command: string,\n options: SpawnOptions\n): SpawnPromise<SpawnResult> {\n const expoCliBinPath =\n process.env.EXPO_CLI_PATH ?? path.resolve(path.dirname(expoCliPackage), '../bin/expo.js');\n options?.logger?.debug(`${expoCliBinPath} ${command}`);\n return spawnAsync('bash', ['-c', `${expoCliBinPath} ${command}`], options);\n}\n"]}
package/dist/ios.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { Ios } from '@expo/eas-build-job';
2
2
  import { BuildParams } from './types';
3
- export declare function buildIosAsync(job: Ios.Job, { workingdir, env }: BuildParams): Promise<string | undefined>;
3
+ export declare function buildIosAsync(job: Ios.Job, { workingdir, env: baseEnv }: BuildParams): Promise<string | undefined>;
package/dist/ios.js CHANGED
@@ -34,12 +34,16 @@ const expoCli_1 = require("./expoCli");
34
34
  const logger_1 = __importStar(require("./logger"));
35
35
  const buildArtifact_1 = require("./buildArtifact");
36
36
  const config_1 = __importDefault(require("./config"));
37
- async function buildIosAsync(job, { workingdir, env }) {
37
+ async function buildIosAsync(job, { workingdir, env: baseEnv }) {
38
+ var _a, _b;
39
+ const buildNumber = (_a = job.version) === null || _a === void 0 ? void 0 : _a.buildNumber;
40
+ const appVersion = (_b = job.version) === null || _b === void 0 ? void 0 : _b.appVersion;
41
+ const env = Object.assign(Object.assign(Object.assign({}, baseEnv), (buildNumber && { EAS_BUILD_IOS_BUILD_NUMBER: buildNumber })), (appVersion && { EAS_BUILD_IOS_APP_VERSION: appVersion }));
38
42
  const ctx = new build_tools_1.BuildContext(job, {
39
43
  workingdir,
40
44
  logger: logger_1.default,
41
45
  logBuffer: logger_1.logBuffer,
42
- runExpoCliCommand: expoCli_1.runExpoCliCommandAsync,
46
+ runGlobalExpoCliCommand: expoCli_1.runGlobalExpoCliCommandAsync,
43
47
  env,
44
48
  skipNativeBuild: config_1.default.skipNativeBuild,
45
49
  });
package/dist/ios.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ios.js","sourceRoot":"","sources":["../src/ios.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAsD;AACtD,mDAA2D;AAC3D,uDAA+B;AAE/B,uCAAmD;AACnD,mDAA6C;AAE7C,mDAAuD;AACvD,sDAA8B;AAEvB,KAAK,UAAU,aAAa,CACjC,GAAY,EACZ,EAAE,UAAU,EAAE,GAAG,EAAe;IAEhC,MAAM,GAAG,GAAG,IAAI,0BAAY,CAAU,GAAG,EAAE;QACzC,UAAU;QACV,MAAM,EAAN,gBAAM;QACN,SAAS,EAAT,kBAAS;QACT,iBAAiB,EAAE,gCAAsB;QACzC,GAAG;QACH,eAAe,EAAE,gBAAM,CAAC,eAAe;KACxC,CAAC,CAAC;IAEH,MAAM,GAAG,CAAC,aAAa,CAAC,0BAAU,CAAC,WAAW,EAAE,KAAK,IAAI,EAAE;QACzD,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAA,cAAI,EAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;IAEH,MAAM,aAAa,GAAG,MAAM,sBAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAErD,OAAO,MAAM,IAAA,oCAAoB,EAAC,GAAG,EAAE,aAAa,CAAC,CAAC;AACxD,CAAC;AApBD,sCAoBC","sourcesContent":["import { Ios, BuildPhase } from '@expo/eas-build-job';\nimport { Builders, BuildContext } from '@expo/build-tools';\nimport omit from 'lodash/omit';\n\nimport { runExpoCliCommandAsync } from './expoCli';\nimport logger, { logBuffer } from './logger';\nimport { BuildParams } from './types';\nimport { prepareBuildArtifact } from './buildArtifact';\nimport config from './config';\n\nexport async function buildIosAsync(\n job: Ios.Job,\n { workingdir, env }: BuildParams\n): Promise<string | undefined> {\n const ctx = new BuildContext<Ios.Job>(job, {\n workingdir,\n logger,\n logBuffer,\n runExpoCliCommand: runExpoCliCommandAsync,\n env,\n skipNativeBuild: config.skipNativeBuild,\n });\n\n await ctx.runBuildPhase(BuildPhase.START_BUILD, async () => {\n ctx.logger.info({ job: omit(ctx.job, 'secrets') }, 'Starting build');\n });\n\n const artifactPaths = await Builders.iosBuilder(ctx);\n\n return await prepareBuildArtifact(ctx, artifactPaths);\n}\n"]}
1
+ {"version":3,"file":"ios.js","sourceRoot":"","sources":["../src/ios.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAA2D;AAC3D,mDAA2D;AAC3D,uDAA+B;AAE/B,uCAAyD;AACzD,mDAA6C;AAE7C,mDAAuD;AACvD,sDAA8B;AAEvB,KAAK,UAAU,aAAa,CACjC,GAAY,EACZ,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,EAAe;;IAEzC,MAAM,WAAW,GAAG,MAAA,GAAG,CAAC,OAAO,0CAAE,WAAW,CAAC;IAC7C,MAAM,UAAU,GAAG,MAAA,GAAG,CAAC,OAAO,0CAAE,UAAU,CAAC;IAC3C,MAAM,GAAG,iDACJ,OAAO,GACP,CAAC,WAAW,IAAI,EAAE,0BAA0B,EAAE,WAAW,EAAE,CAAC,GAC5D,CAAC,UAAU,IAAI,EAAE,yBAAyB,EAAE,UAAU,EAAE,CAAC,CAC7D,CAAC;IACF,MAAM,GAAG,GAAG,IAAI,0BAAY,CAAU,GAAG,EAAE;QACzC,UAAU;QACV,MAAM,EAAN,gBAAM;QACN,SAAS,EAAT,kBAAS;QACT,uBAAuB,EAAE,sCAA4B;QACrD,GAAG;QACH,eAAe,EAAE,gBAAM,CAAC,eAAe;KACxC,CAAC,CAAC;IAEH,MAAM,GAAG,CAAC,aAAa,CAAC,0BAAU,CAAC,WAAW,EAAE,KAAK,IAAI,EAAE;QACzD,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAA,cAAI,EAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;IAEH,MAAM,aAAa,GAAG,MAAM,sBAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAErD,OAAO,MAAM,IAAA,oCAAoB,EAAC,GAAG,EAAE,aAAa,CAAC,CAAC;AACxD,CAAC;AA3BD,sCA2BC","sourcesContent":["import { Ios, BuildPhase, Env } from '@expo/eas-build-job';\nimport { Builders, BuildContext } from '@expo/build-tools';\nimport omit from 'lodash/omit';\n\nimport { runGlobalExpoCliCommandAsync } from './expoCli';\nimport logger, { logBuffer } from './logger';\nimport { BuildParams } from './types';\nimport { prepareBuildArtifact } from './buildArtifact';\nimport config from './config';\n\nexport async function buildIosAsync(\n job: Ios.Job,\n { workingdir, env: baseEnv }: BuildParams\n): Promise<string | undefined> {\n const buildNumber = job.version?.buildNumber;\n const appVersion = job.version?.appVersion;\n const env: Env = {\n ...baseEnv,\n ...(buildNumber && { EAS_BUILD_IOS_BUILD_NUMBER: buildNumber }),\n ...(appVersion && { EAS_BUILD_IOS_APP_VERSION: appVersion }),\n };\n const ctx = new BuildContext<Ios.Job>(job, {\n workingdir,\n logger,\n logBuffer,\n runGlobalExpoCliCommand: runGlobalExpoCliCommandAsync,\n env,\n skipNativeBuild: config.skipNativeBuild,\n });\n\n await ctx.runBuildPhase(BuildPhase.START_BUILD, async () => {\n ctx.logger.info({ job: omit(ctx.job, 'secrets') }, 'Starting build');\n });\n\n const artifactPaths = await Builders.iosBuilder(ctx);\n\n return await prepareBuildArtifact(ctx, artifactPaths);\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eas-cli-local-build-plugin",
3
- "version": "0.0.86",
3
+ "version": "0.0.89",
4
4
  "description": "Tool for running EAS compatible builds on a local machine.",
5
5
  "main": "dist/main.js",
6
6
  "bin": {
@@ -19,11 +19,11 @@
19
19
  "bugs": "https://github.com/expo/eas-build/issues",
20
20
  "license": "BUSL-1.1",
21
21
  "dependencies": {
22
- "@expo/build-tools": "0.1.130",
22
+ "@expo/build-tools": "0.1.133",
23
23
  "@expo/bunyan": "^4.0.0",
24
- "@expo/eas-build-job": "0.2.78",
24
+ "@expo/eas-build-job": "0.2.81",
25
25
  "@expo/spawn-async": "^1.5.0",
26
- "@expo/turtle-spawn": "0.0.23",
26
+ "@expo/turtle-spawn": "0.0.25",
27
27
  "chalk": "^4.1.0",
28
28
  "env-paths": "2.2.0",
29
29
  "expo-cli": "5.4.9",
@@ -44,5 +44,9 @@
44
44
  "jest": "^27.5.1",
45
45
  "ts-jest": "^27.1.3",
46
46
  "typescript": "^4.6.2"
47
+ },
48
+ "volta": {
49
+ "node": "16.13.2",
50
+ "yarn": "1.22.17"
47
51
  }
48
52
  }
package/src/android.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Android, BuildPhase } from '@expo/eas-build-job';
1
+ import { Android, BuildPhase, Env } from '@expo/eas-build-job';
2
2
  import { Builders, BuildContext } from '@expo/build-tools';
3
3
  import omit from 'lodash/omit';
4
4
 
@@ -6,17 +6,24 @@ import logger, { logBuffer } from './logger';
6
6
  import { BuildParams } from './types';
7
7
  import { prepareBuildArtifact } from './buildArtifact';
8
8
  import config from './config';
9
- import { runExpoCliCommandAsync } from './expoCli';
9
+ import { runGlobalExpoCliCommandAsync } from './expoCli';
10
10
 
11
11
  export async function buildAndroidAsync(
12
12
  job: Android.Job,
13
- { workingdir, env }: BuildParams
13
+ { workingdir, env: baseEnv }: BuildParams
14
14
  ): Promise<string | undefined> {
15
+ const versionName = job.version?.versionName;
16
+ const versionCode = job.version?.versionCode;
17
+ const env: Env = {
18
+ ...baseEnv,
19
+ ...(versionCode && { EAS_BUILD_ANDROID_VERSION_CODE: versionCode }),
20
+ ...(versionName && { EAS_BUILD_ANDROID_VERSION_NAME: versionName }),
21
+ };
15
22
  const ctx = new BuildContext<Android.Job>(job, {
16
23
  workingdir,
17
24
  logger,
18
25
  logBuffer,
19
- runExpoCliCommand: runExpoCliCommandAsync,
26
+ runGlobalExpoCliCommand: runGlobalExpoCliCommandAsync,
20
27
  env,
21
28
  skipNativeBuild: config.skipNativeBuild,
22
29
  });
package/src/build.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import path from 'path';
2
+
1
3
  import { Job, Platform, ArchiveSourceType } from '@expo/eas-build-job';
2
4
  import pickBy from 'lodash/pickBy';
3
5
  import fs from 'fs-extra';
@@ -17,6 +19,7 @@ export async function buildAsync(job: Job): Promise<void> {
17
19
  ...pickBy(process.env, (val?: string): val is string => !!val),
18
20
  ...job.builderEnvironment?.env,
19
21
  EAS_BUILD: '1',
22
+ EAS_BUILD_WORKINGDIR: path.join(workingdir, 'build'),
20
23
  };
21
24
  let artifactPath: string | undefined;
22
25
  switch (job.platform) {
package/src/expoCli.ts CHANGED
@@ -4,7 +4,7 @@ import spawnAsync, { SpawnOptions, SpawnPromise, SpawnResult } from '@expo/turtl
4
4
 
5
5
  const expoCliPackage = require.resolve('expo-cli');
6
6
 
7
- export function runExpoCliCommandAsync(
7
+ export function runGlobalExpoCliCommandAsync(
8
8
  command: string,
9
9
  options: SpawnOptions
10
10
  ): SpawnPromise<SpawnResult> {
package/src/ios.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { Ios, BuildPhase } from '@expo/eas-build-job';
1
+ import { Ios, BuildPhase, Env } from '@expo/eas-build-job';
2
2
  import { Builders, BuildContext } from '@expo/build-tools';
3
3
  import omit from 'lodash/omit';
4
4
 
5
- import { runExpoCliCommandAsync } from './expoCli';
5
+ import { runGlobalExpoCliCommandAsync } from './expoCli';
6
6
  import logger, { logBuffer } from './logger';
7
7
  import { BuildParams } from './types';
8
8
  import { prepareBuildArtifact } from './buildArtifact';
@@ -10,13 +10,20 @@ import config from './config';
10
10
 
11
11
  export async function buildIosAsync(
12
12
  job: Ios.Job,
13
- { workingdir, env }: BuildParams
13
+ { workingdir, env: baseEnv }: BuildParams
14
14
  ): Promise<string | undefined> {
15
+ const buildNumber = job.version?.buildNumber;
16
+ const appVersion = job.version?.appVersion;
17
+ const env: Env = {
18
+ ...baseEnv,
19
+ ...(buildNumber && { EAS_BUILD_IOS_BUILD_NUMBER: buildNumber }),
20
+ ...(appVersion && { EAS_BUILD_IOS_APP_VERSION: appVersion }),
21
+ };
15
22
  const ctx = new BuildContext<Ios.Job>(job, {
16
23
  workingdir,
17
24
  logger,
18
25
  logBuffer,
19
- runExpoCliCommand: runExpoCliCommandAsync,
26
+ runGlobalExpoCliCommand: runGlobalExpoCliCommandAsync,
20
27
  env,
21
28
  skipNativeBuild: config.skipNativeBuild,
22
29
  });