From f173cc32c044af4030fa3bd6d5cbdbadf9ac29dd Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Mon, 28 Jul 2025 17:02:02 -0500 Subject: [PATCH] Align on RELEASE_VERSION --- src/env/common.ts | 1 - src/env/index.ts | 5 ++--- src/env/index.web.ts | 5 ++--- src/lib/statsig/statsig.tsx | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/env/common.ts b/src/env/common.ts index e1b2df8cb6..3e27ea757a 100644 --- a/src/env/common.ts +++ b/src/env/common.ts @@ -7,7 +7,6 @@ import packageJson from '#/../package.json' */ export const RELEASE_VERSION: string = process.env.EXPO_PUBLIC_RELEASE_VERSION || packageJson.version -export const PACKAGE_VERSION: string = packageJson.version /** * The env the app is running in e.g. development, testflight, production diff --git a/src/env/index.ts b/src/env/index.ts index b91be0e4c9..8558c55b5d 100644 --- a/src/env/index.ts +++ b/src/env/index.ts @@ -1,7 +1,6 @@ import {nativeBuildVersion} from 'expo-application' -import packageJson from '#/../package.json' -import {BUNDLE_IDENTIFIER, IS_TESTFLIGHT} from '#/env/common' +import {BUNDLE_IDENTIFIER, IS_TESTFLIGHT, RELEASE_VERSION} from '#/env/common' export * from '#/env/common' @@ -10,7 +9,7 @@ export * from '#/env/common' * iOs/Android, the native build version is appended to the semver version, so * that it can be used to identify a specific build. */ -export const APP_VERSION = `${packageJson.version}.${nativeBuildVersion}` +export const APP_VERSION = `${RELEASE_VERSION}.${nativeBuildVersion}` /** * The short commit hash and environment of the current bundle. diff --git a/src/env/index.web.ts b/src/env/index.web.ts index 357ac4d6b1..66087749b7 100644 --- a/src/env/index.web.ts +++ b/src/env/index.web.ts @@ -1,5 +1,4 @@ -import packageJson from '#/../package.json' -import {BUNDLE_IDENTIFIER} from '#/env/common' +import {BUNDLE_IDENTIFIER, RELEASE_VERSION} from '#/env/common' export * from '#/env/common' @@ -8,7 +7,7 @@ export * from '#/env/common' * iOs/Android, the native build version is appended to the semver version, so * that it can be used to identify a specific build. */ -export const APP_VERSION = packageJson.version +export const APP_VERSION = RELEASE_VERSION /** * The short commit hash and environment of the current bundle. diff --git a/src/lib/statsig/statsig.tsx b/src/lib/statsig/statsig.tsx index 7600255319..1091c82e04 100644 --- a/src/lib/statsig/statsig.tsx +++ b/src/lib/statsig/statsig.tsx @@ -210,7 +210,7 @@ function toStatsigUser(did: string | undefined): StatsigUser { refSrc, refUrl, platform: Platform.OS as 'ios' | 'android' | 'web', - appVersion: env.PACKAGE_VERSION, + appVersion: env.RELEASE_VERSION, bundleIdentifier: env.BUNDLE_IDENTIFIER, bundleDate: env.BUNDLE_DATE, appLanguage: languagePrefs.appLanguage,