From 4fb5c9edb6f50cebc55c1726a589fca993b9b907 Mon Sep 17 00:00:00 2001 From: Dominik Sokal Date: Wed, 19 May 2021 11:32:05 +0200 Subject: [PATCH 1/6] add functions for reading buildNumber / versionCode --- .../build/android/__tests__/version-test.ts | 84 +++++++++++++++++++ packages/eas-cli/src/build/android/version.ts | 25 ++++++ .../src/build/ios/__tests__/version-test.ts | 25 +++++- packages/eas-cli/src/build/ios/version.ts | 21 ++++- packages/eas-cli/src/build/utils/appJson.ts | 1 - 5 files changed, 151 insertions(+), 5 deletions(-) create mode 100644 packages/eas-cli/src/build/android/__tests__/version-test.ts create mode 100644 packages/eas-cli/src/build/android/version.ts diff --git a/packages/eas-cli/src/build/android/__tests__/version-test.ts b/packages/eas-cli/src/build/android/__tests__/version-test.ts new file mode 100644 index 0000000000..d12681207a --- /dev/null +++ b/packages/eas-cli/src/build/android/__tests__/version-test.ts @@ -0,0 +1,84 @@ +import { ExpoConfig } from '@expo/config'; +import { vol } from 'memfs'; + +import { readVersionCode } from '../version'; + +beforeEach(() => { + vol.reset(); +}); + +describe(readVersionCode, () => { + describe('generic project', () => { + it('reads the version code from native code', () => { + const exp = initGenericProject(); + const versionCode = readVersionCode('/repo', exp); + expect(versionCode).toBe(123); + }); + }); + describe('managed project', () => { + it('reads the version code from expo config', () => { + const exp = initManagedProject(); + const versionCode = readVersionCode('/repo', exp); + expect(versionCode).toBe(123); + }); + }); +}); + +function initGenericProject(): ExpoConfig { + vol.fromJSON( + { + './app.json': JSON.stringify({ + expo: { + version: '1.0.0', + android: { + versionCode: 1, + }, + }, + }), + './android/app/build.gradle': `android { + defaultConfig { + applicationId "com.expo.testapp" + versionCode 123 + versionName "1.0" + } +}`, + }, + '/repo' + ); + + const fakeExp: ExpoConfig = { + name: 'myproject', + slug: 'myproject', + version: '1.0.0', + android: { + versionCode: 123, + }, + }; + return fakeExp; +} + +function initManagedProject(): ExpoConfig { + vol.fromJSON( + { + './app.json': JSON.stringify({ + expo: { + version: '1.0.0', + android: { + versionCode: 123, + }, + }, + }), + }, + '/repo' + ); + + const fakeExp: ExpoConfig = { + name: 'myproject', + slug: 'myproject', + version: '1.0.0', + android: { + versionCode: 123, + }, + }; + return fakeExp; +} diff --git a/packages/eas-cli/src/build/android/version.ts b/packages/eas-cli/src/build/android/version.ts new file mode 100644 index 0000000000..5a29327d0c --- /dev/null +++ b/packages/eas-cli/src/build/android/version.ts @@ -0,0 +1,25 @@ +import { ExpoConfig } from '@expo/config'; +import { AndroidConfig } from '@expo/config-plugins'; +import { Platform, Workflow } from '@expo/eas-build-job'; +import fs from 'fs-extra'; + +import { resolveWorkflow } from '../../project/workflow'; + +export function readVersionCode(projectDir: string, exp: ExpoConfig): number | undefined { + const workflow = resolveWorkflow(projectDir, Platform.ANDROID); + if (workflow === Workflow.GENERIC) { + const buildGradlePath = AndroidConfig.Paths.getAppBuildGradle(projectDir); + if (!fs.pathExistsSync(buildGradlePath)) { + return undefined; + } + const buildGradle = fs.readFileSync(buildGradlePath, 'utf8'); + const matchResult = buildGradle.match(/versionCode (.*)/); + if (matchResult) { + return Number(matchResult[1]); + } else { + return undefined; + } + } else { + return AndroidConfig.Version.getVersionCode(exp) ?? undefined; + } +} diff --git a/packages/eas-cli/src/build/ios/__tests__/version-test.ts b/packages/eas-cli/src/build/ios/__tests__/version-test.ts index 570d3284c5..0ec1371a04 100644 --- a/packages/eas-cli/src/build/ios/__tests__/version-test.ts +++ b/packages/eas-cli/src/build/ios/__tests__/version-test.ts @@ -5,7 +5,12 @@ import { vol } from 'memfs'; import os from 'os'; import { readPlistAsync } from '../plist'; -import { BumpStrategy, bumpVersionAsync, bumpVersionInAppJsonAsync } from '../version'; +import { + BumpStrategy, + bumpVersionAsync, + bumpVersionInAppJsonAsync, + readBuildNumberAsync, +} from '../version'; jest.mock('fs'); @@ -144,6 +149,24 @@ describe(bumpVersionInAppJsonAsync, () => { }); }); +describe(readBuildNumberAsync, () => { + describe('generic project', () => { + it('reads the build number from native code', async () => { + const exp = initGenericProject(); + const buildNumber = await readBuildNumberAsync('/repo', exp); + expect(buildNumber).toBe('1'); + }); + }); + + describe('managed project', () => { + it('reads the build number from expo config', async () => { + const exp = initManagedProject(); + const buildNumber = await readBuildNumberAsync('/repo', exp); + expect(buildNumber).toBe('1'); + }); + }); +}); + function initGenericProject(): ExpoConfig { vol.fromJSON( { diff --git a/packages/eas-cli/src/build/ios/version.ts b/packages/eas-cli/src/build/ios/version.ts index 3a4e6ca10e..35e8ad4a26 100644 --- a/packages/eas-cli/src/build/ios/version.ts +++ b/packages/eas-cli/src/build/ios/version.ts @@ -1,10 +1,12 @@ import { ExpoConfig, getConfigFilePaths } from '@expo/config'; import { IOSConfig } from '@expo/config-plugins'; +import { Platform, Workflow } from '@expo/eas-build-job'; import chalk from 'chalk'; import nullthrows from 'nullthrows'; import semver from 'semver'; import Log from '../../log'; +import { resolveWorkflow } from '../../project/workflow'; import { promptAsync } from '../../prompts'; import { updateAppJsonConfigAsync } from '../utils/appJson'; import { readPlistAsync, writePlistAsync } from './plist'; @@ -100,9 +102,17 @@ export async function bumpVersionInAppJsonAsync({ } } -async function readInfoPlistAsync(projectDir: string): Promise { - const infoPlistPath = IOSConfig.Paths.getInfoPlistPath(projectDir); - return (await readPlistAsync(infoPlistPath)) as IOSConfig.InfoPlist; +export async function readBuildNumberAsync( + projectDir: string, + exp: ExpoConfig +): Promise { + const workflow = resolveWorkflow(projectDir, Platform.IOS); + if (workflow === Workflow.GENERIC) { + const infoPlist = await readInfoPlistAsync(projectDir); + return infoPlist.CFBundleVersion; + } else { + return IOSConfig.Version.getBuildNumber(exp); + } } async function writeVersionsToInfoPlistAsync({ @@ -120,6 +130,11 @@ async function writeVersionsToInfoPlistAsync({ return updatedInfoPlist; } +async function readInfoPlistAsync(projectDir: string): Promise { + const infoPlistPath = IOSConfig.Paths.getInfoPlistPath(projectDir); + return (await readPlistAsync(infoPlistPath)) as IOSConfig.InfoPlist; +} + async function writeInfoPlistAsync({ projectDir, infoPlist, diff --git a/packages/eas-cli/src/build/utils/appJson.ts b/packages/eas-cli/src/build/utils/appJson.ts index beec346c19..98dae7915b 100644 --- a/packages/eas-cli/src/build/utils/appJson.ts +++ b/packages/eas-cli/src/build/utils/appJson.ts @@ -1,4 +1,3 @@ -// import { ExpoConfig, getConfigFilePaths } from '@expo/config'; import * as ExpoConfig from '@expo/config'; import assert from 'assert'; import fs from 'fs-extra'; From 491b3b729c1b836b88b1e91160905c246eb0b576 Mon Sep 17 00:00:00 2001 From: Dominik Sokal Date: Wed, 19 May 2021 12:32:33 +0200 Subject: [PATCH 2/6] add buildNumber and versionCode to metadata --- packages/eas-cli/src/build/metadata.ts | 34 ++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/packages/eas-cli/src/build/metadata.ts b/packages/eas-cli/src/build/metadata.ts index add0da4ff2..f9d75a7ddf 100644 --- a/packages/eas-cli/src/build/metadata.ts +++ b/packages/eas-cli/src/build/metadata.ts @@ -7,8 +7,10 @@ import { getUsername } from '../project/projectUtils'; import { ensureLoggedInAsync } from '../user/actions'; import { gitCommitHashAsync } from '../utils/git'; import { readReleaseChannelSafelyAsync as readAndroidReleaseChannelSafelyAsync } from './android/UpdatesModule'; +import { readVersionCode } from './android/version'; import { BuildContext } from './context'; import { readReleaseChannelSafelyAsync as readIosReleaseChannelSafelyAsync } from './ios/UpdatesModule'; +import { readBuildNumberAsync } from './ios/version'; import { Platform } from './types'; import { isExpoUpdatesInstalled } from './utils/updates'; @@ -27,10 +29,6 @@ export async function collectMetadata( credentialsSource?: CredentialsSource.LOCAL | CredentialsSource.REMOTE; } ): Promise { - const appIdentifier = - ctx.platform === Platform.IOS - ? getBundleIdentifier(ctx.commandCtx.projectDir, ctx.commandCtx.exp) - : getApplicationId(ctx.commandCtx.projectDir, ctx.commandCtx.exp); return { trackingContext: ctx.trackingCtx, appVersion: ctx.commandCtx.exp.version!, @@ -41,13 +39,39 @@ export async function collectMetadata( releaseChannel: await resolveReleaseChannel(ctx), distribution: ctx.buildProfile.distribution ?? 'store', appName: ctx.commandCtx.exp.name, - appIdentifier, + appIdentifier: resolveAppIdentifier(ctx), buildProfile: ctx.commandCtx.profile, gitCommitHash: await gitCommitHashAsync(), username: getUsername(ctx.commandCtx.exp, await ensureLoggedInAsync()), + buildNumber: await resolveBuildNumberAsync(ctx), + versionCode: resolveVersionCode(ctx), }; } +function resolveAppIdentifier(ctx: BuildContext): string { + if (ctx.platform === Platform.IOS) { + return getBundleIdentifier(ctx.commandCtx.projectDir, ctx.commandCtx.exp); + } else { + return getApplicationId(ctx.commandCtx.projectDir, ctx.commandCtx.exp); + } +} + +async function resolveBuildNumberAsync( + ctx: BuildContext +): Promise { + if (ctx.platform !== Platform.IOS) { + return undefined; + } + return readBuildNumberAsync(ctx.commandCtx.projectDir, ctx.commandCtx.exp); +} + +function resolveVersionCode(ctx: BuildContext): number | undefined { + if (ctx.platform !== Platform.ANDROID) { + return undefined; + } + return readVersionCode(ctx.commandCtx.projectDir, ctx.commandCtx.exp); +} + async function resolveReleaseChannel( ctx: BuildContext ): Promise { From 89fbf9bb941b52c078ae936eb9631a3c737ee577 Mon Sep 17 00:00:00 2001 From: Dominik Sokal Date: Wed, 19 May 2021 13:20:34 +0200 Subject: [PATCH 3/6] read proper app version for generic projects --- .../build/android/__tests__/version-test.ts | 32 ++++++++++++++++++- packages/eas-cli/src/build/android/version.ts | 31 ++++++++++++++---- .../src/build/ios/__tests__/version-test.ts | 19 +++++++++++ packages/eas-cli/src/build/ios/version.ts | 13 ++++++++ packages/eas-cli/src/build/metadata.ts | 16 ++++++++-- 5 files changed, 101 insertions(+), 10 deletions(-) diff --git a/packages/eas-cli/src/build/android/__tests__/version-test.ts b/packages/eas-cli/src/build/android/__tests__/version-test.ts index d12681207a..64dda66fad 100644 --- a/packages/eas-cli/src/build/android/__tests__/version-test.ts +++ b/packages/eas-cli/src/build/android/__tests__/version-test.ts @@ -1,10 +1,23 @@ import { ExpoConfig } from '@expo/config'; +import fs from 'fs-extra'; import { vol } from 'memfs'; +import os from 'os'; -import { readVersionCode } from '../version'; +import { readVersionCode, readVersionName } from '../version'; + +jest.mock('fs'); + +afterAll(() => { + // do not remove the following line + // this fixes a weird error with tempy in @expo/image-utils + fs.removeSync(os.tmpdir()); +}); beforeEach(() => { vol.reset(); + // do not remove the following line + // this fixes a weird error with tempy in @expo/image-utils + fs.mkdirpSync(os.tmpdir()); }); describe(readVersionCode, () => { @@ -24,6 +37,23 @@ describe(readVersionCode, () => { }); }); +describe(readVersionName, () => { + describe('generic project', () => { + it('reads the version name from native code', () => { + const exp = initGenericProject(); + const versionName = readVersionName('/repo', exp); + expect(versionName).toBe('1.0'); + }); + }); + describe('managed project', () => { + it('reads the version from expo config', () => { + const exp = initManagedProject(); + const versionName = readVersionName('/repo', exp); + expect(versionName).toBe('1.0.0'); + }); + }); +}); + function initGenericProject(): ExpoConfig { vol.fromJSON( { diff --git a/packages/eas-cli/src/build/android/version.ts b/packages/eas-cli/src/build/android/version.ts index 5a29327d0c..7d5d8e8be4 100644 --- a/packages/eas-cli/src/build/android/version.ts +++ b/packages/eas-cli/src/build/android/version.ts @@ -8,12 +8,8 @@ import { resolveWorkflow } from '../../project/workflow'; export function readVersionCode(projectDir: string, exp: ExpoConfig): number | undefined { const workflow = resolveWorkflow(projectDir, Platform.ANDROID); if (workflow === Workflow.GENERIC) { - const buildGradlePath = AndroidConfig.Paths.getAppBuildGradle(projectDir); - if (!fs.pathExistsSync(buildGradlePath)) { - return undefined; - } - const buildGradle = fs.readFileSync(buildGradlePath, 'utf8'); - const matchResult = buildGradle.match(/versionCode (.*)/); + const buildGradle = readBuildGradle(projectDir); + const matchResult = buildGradle?.match(/versionCode (.*)/); if (matchResult) { return Number(matchResult[1]); } else { @@ -23,3 +19,26 @@ export function readVersionCode(projectDir: string, exp: ExpoConfig): number | u return AndroidConfig.Version.getVersionCode(exp) ?? undefined; } } + +export function readVersionName(projectDir: string, exp: ExpoConfig): string | undefined { + const workflow = resolveWorkflow(projectDir, Platform.ANDROID); + if (workflow === Workflow.GENERIC) { + const buildGradle = readBuildGradle(projectDir); + const matchResult = buildGradle?.match(/versionName ["'](.*)["']/); + if (matchResult) { + return matchResult[1]; + } else { + return undefined; + } + } else { + return exp.version; + } +} + +function readBuildGradle(projectDir: string): string | undefined { + const buildGradlePath = AndroidConfig.Paths.getAppBuildGradle(projectDir); + if (!fs.pathExistsSync(buildGradlePath)) { + return undefined; + } + return fs.readFileSync(buildGradlePath, 'utf8'); +} diff --git a/packages/eas-cli/src/build/ios/__tests__/version-test.ts b/packages/eas-cli/src/build/ios/__tests__/version-test.ts index 0ec1371a04..c8ae364249 100644 --- a/packages/eas-cli/src/build/ios/__tests__/version-test.ts +++ b/packages/eas-cli/src/build/ios/__tests__/version-test.ts @@ -10,6 +10,7 @@ import { bumpVersionAsync, bumpVersionInAppJsonAsync, readBuildNumberAsync, + readShortVersionAsync, } from '../version'; jest.mock('fs'); @@ -167,6 +168,24 @@ describe(readBuildNumberAsync, () => { }); }); +describe(readShortVersionAsync, () => { + describe('generic project', () => { + it('reads the short version from native code', async () => { + const exp = initGenericProject(); + const shortVersion = await readShortVersionAsync('/repo', exp); + expect(shortVersion).toBe('1.0.0'); + }); + }); + + describe('managed project', () => { + it('reads the version from app config', async () => { + const exp = initGenericProject(); + const shortVersion = await readShortVersionAsync('/repo', exp); + expect(shortVersion).toBe('1.0.0'); + }); + }); +}); + function initGenericProject(): ExpoConfig { vol.fromJSON( { diff --git a/packages/eas-cli/src/build/ios/version.ts b/packages/eas-cli/src/build/ios/version.ts index 35e8ad4a26..aad70e89a2 100644 --- a/packages/eas-cli/src/build/ios/version.ts +++ b/packages/eas-cli/src/build/ios/version.ts @@ -102,6 +102,19 @@ export async function bumpVersionInAppJsonAsync({ } } +export async function readShortVersionAsync( + projectDir: string, + exp: ExpoConfig +): Promise { + const workflow = resolveWorkflow(projectDir, Platform.IOS); + if (workflow === Workflow.GENERIC) { + const infoPlist = await readInfoPlistAsync(projectDir); + return infoPlist.CFBundleShortVersionString; + } else { + return exp.version; + } +} + export async function readBuildNumberAsync( projectDir: string, exp: ExpoConfig diff --git a/packages/eas-cli/src/build/metadata.ts b/packages/eas-cli/src/build/metadata.ts index f9d75a7ddf..23c99abd6c 100644 --- a/packages/eas-cli/src/build/metadata.ts +++ b/packages/eas-cli/src/build/metadata.ts @@ -7,10 +7,10 @@ import { getUsername } from '../project/projectUtils'; import { ensureLoggedInAsync } from '../user/actions'; import { gitCommitHashAsync } from '../utils/git'; import { readReleaseChannelSafelyAsync as readAndroidReleaseChannelSafelyAsync } from './android/UpdatesModule'; -import { readVersionCode } from './android/version'; +import { readVersionCode, readVersionName } from './android/version'; import { BuildContext } from './context'; import { readReleaseChannelSafelyAsync as readIosReleaseChannelSafelyAsync } from './ios/UpdatesModule'; -import { readBuildNumberAsync } from './ios/version'; +import { readBuildNumberAsync, readShortVersionAsync } from './ios/version'; import { Platform } from './types'; import { isExpoUpdatesInstalled } from './utils/updates'; @@ -31,7 +31,7 @@ export async function collectMetadata( ): Promise { return { trackingContext: ctx.trackingCtx, - appVersion: ctx.commandCtx.exp.version!, + appVersion: await resolveAppVersionAsync(ctx), cliVersion: packageJSON.version, workflow: ctx.buildProfile.workflow, credentialsSource, @@ -48,6 +48,16 @@ export async function collectMetadata( }; } +async function resolveAppVersionAsync( + ctx: BuildContext +): Promise { + if (ctx.platform === Platform.IOS) { + return await readShortVersionAsync(ctx.commandCtx.projectDir, ctx.commandCtx.exp); + } else { + return readVersionName(ctx.commandCtx.projectDir, ctx.commandCtx.exp); + } +} + function resolveAppIdentifier(ctx: BuildContext): string { if (ctx.platform === Platform.IOS) { return getBundleIdentifier(ctx.commandCtx.projectDir, ctx.commandCtx.exp); From ecac902d13adcfea6ec303107c7934fb4d51c5a6 Mon Sep 17 00:00:00 2001 From: Dominik Sokal Date: Wed, 19 May 2021 13:22:00 +0200 Subject: [PATCH 4/6] bump @expo/eas-build-job to 0.2.35 --- packages/eas-cli/package.json | 2 +- packages/eas-json/package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/eas-cli/package.json b/packages/eas-cli/package.json index e40d3b079f..6f0286d941 100644 --- a/packages/eas-cli/package.json +++ b/packages/eas-cli/package.json @@ -13,7 +13,7 @@ "@expo/apple-utils": "0.0.0-alpha.20", "@expo/config": "3.3.19", "@expo/config-plugins": "1.0.31", - "@expo/eas-build-job": "0.2.33", + "@expo/eas-build-job": "0.2.35", "@expo/eas-json": "0.14.0", "@expo/json-file": "8.2.25", "@expo/pkcs12": "0.0.4", diff --git a/packages/eas-json/package.json b/packages/eas-json/package.json index 2460f9d973..8f02ca8f25 100644 --- a/packages/eas-json/package.json +++ b/packages/eas-json/package.json @@ -5,7 +5,7 @@ "author": "Expo ", "bugs": "https://github.com/expo/eas-cli/issues", "dependencies": { - "@expo/eas-build-job": "0.2.33", + "@expo/eas-build-job": "0.2.35", "@hapi/joi": "17.1.1", "fs-extra": "9.0.1", "tslib": "1.14.1" diff --git a/yarn.lock b/yarn.lock index 08e2c3c052..27174f7db0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1181,10 +1181,10 @@ xcode "^3.0.0" xml-js "^1.6.11" -"@expo/eas-build-job@0.2.33": - version "0.2.33" - resolved "https://registry.yarnpkg.com/@expo/eas-build-job/-/eas-build-job-0.2.33.tgz#fef76ad0acce6cdd828ddc22945184024df05fad" - integrity sha512-OB/ytNkNHI9wydOrhVTrP2XjT0AUzn038eEG4U0QYif2fs1nXUBd6gHM3YNiQjdJtTSXjGpvgBDfNPLIgJHlOQ== +"@expo/eas-build-job@0.2.35": + version "0.2.35" + resolved "https://registry.yarnpkg.com/@expo/eas-build-job/-/eas-build-job-0.2.35.tgz#4e64ebe1314d0af0f33d3922b15d9e3fe415378e" + integrity sha512-+R24ZbZSgC1rLm83pOIUJ8pk2e9e/V6nJBrdl/jLWaCE1YPp1N/Elh8R6x1QuqYyXGOm2AG6r++MGItg9KmggA== dependencies: "@hapi/joi" "^17.1.1" From 28a47d08cbd63476320c9774ec3d5830e60fb4c1 Mon Sep 17 00:00:00 2001 From: Dominik Sokal Date: Thu, 20 May 2021 11:33:26 +0200 Subject: [PATCH 5/6] address PR feedback --- packages/eas-cli/src/build/metadata.ts | 30 +++++++++++--------------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/packages/eas-cli/src/build/metadata.ts b/packages/eas-cli/src/build/metadata.ts index 23c99abd6c..69babb3779 100644 --- a/packages/eas-cli/src/build/metadata.ts +++ b/packages/eas-cli/src/build/metadata.ts @@ -32,6 +32,7 @@ export async function collectMetadata( return { trackingContext: ctx.trackingCtx, appVersion: await resolveAppVersionAsync(ctx), + appBuildVersion: await resolveAppBuildVersionAsync(ctx), cliVersion: packageJSON.version, workflow: ctx.buildProfile.workflow, credentialsSource, @@ -43,8 +44,6 @@ export async function collectMetadata( buildProfile: ctx.commandCtx.profile, gitCommitHash: await gitCommitHashAsync(), username: getUsername(ctx.commandCtx.exp, await ensureLoggedInAsync()), - buildNumber: await resolveBuildNumberAsync(ctx), - versionCode: resolveVersionCode(ctx), }; } @@ -58,28 +57,23 @@ async function resolveAppVersionAsync( } } -function resolveAppIdentifier(ctx: BuildContext): string { - if (ctx.platform === Platform.IOS) { - return getBundleIdentifier(ctx.commandCtx.projectDir, ctx.commandCtx.exp); - } else { - return getApplicationId(ctx.commandCtx.projectDir, ctx.commandCtx.exp); - } -} - -async function resolveBuildNumberAsync( +async function resolveAppBuildVersionAsync( ctx: BuildContext ): Promise { - if (ctx.platform !== Platform.IOS) { - return undefined; + if (ctx.platform === Platform.IOS) { + return await readBuildNumberAsync(ctx.commandCtx.projectDir, ctx.commandCtx.exp); + } else { + const versionCode = readVersionCode(ctx.commandCtx.projectDir, ctx.commandCtx.exp); + return versionCode !== undefined ? String(versionCode) : undefined; } - return readBuildNumberAsync(ctx.commandCtx.projectDir, ctx.commandCtx.exp); } -function resolveVersionCode(ctx: BuildContext): number | undefined { - if (ctx.platform !== Platform.ANDROID) { - return undefined; +function resolveAppIdentifier(ctx: BuildContext): string { + if (ctx.platform === Platform.IOS) { + return getBundleIdentifier(ctx.commandCtx.projectDir, ctx.commandCtx.exp); + } else { + return getApplicationId(ctx.commandCtx.projectDir, ctx.commandCtx.exp); } - return readVersionCode(ctx.commandCtx.projectDir, ctx.commandCtx.exp); } async function resolveReleaseChannel( From 153fbc654251fd2fcf449bb5f8a6cdfb6227b6c5 Mon Sep 17 00:00:00 2001 From: Dominik Sokal Date: Wed, 19 May 2021 13:25:06 +0200 Subject: [PATCH 6/6] update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index be4a01b73d..1313a81e03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ This is the log of notable changes to EAS CLI and related packages. - Allow for installing custom `expo-cli` version on EAS Build. ([#409](https://github.com/expo/eas-cli/pull/409) by [@randomhajile](https://github.com/randomhajile)) - Support PKCS kesytores for Android. ([#398](https://github.com/expo/eas-cli/pull/398) by [@wkozyra95](https://github.com/wkozyra95)) - Support empty passwords in Android and iOS keystores. ([#398](https://github.com/expo/eas-cli/pull/398) by [@wkozyra95](https://github.com/wkozyra95)) +- Add more build metadata - `appBuildVersion`. ([#413](https://github.com/expo/eas-cli/pull/413) by [@dsokal](https://github.com/dsokal)) ### 🐛 Bug fixes