diff --git a/src/env/index.ts b/src/env/index.ts index fa7e85f5b1..b91be0e4c9 100644 --- a/src/env/index.ts +++ b/src/env/index.ts @@ -15,6 +15,6 @@ export const APP_VERSION = `${packageJson.version}.${nativeBuildVersion}` /** * The short commit hash and environment of the current bundle. */ -export const APP_METADATA = `${BUNDLE_IDENTIFIER} (${ +export const APP_METADATA = `${BUNDLE_IDENTIFIER.slice(0, 7)} (${ __DEV__ ? 'dev' : IS_TESTFLIGHT ? 'tf' : 'prod' })` diff --git a/src/env/index.web.ts b/src/env/index.web.ts index 575bf50daa..357ac4d6b1 100644 --- a/src/env/index.web.ts +++ b/src/env/index.web.ts @@ -13,4 +13,4 @@ export const APP_VERSION = packageJson.version /** * The short commit hash and environment of the current bundle. */ -export const APP_METADATA = `${BUNDLE_IDENTIFIER} (${__DEV__ ? 'dev' : 'prod'})` +export const APP_METADATA = `${BUNDLE_IDENTIFIER.slice(0, 7)} (${__DEV__ ? 'dev' : 'prod'})` diff --git a/src/screens/Settings/AboutSettings.tsx b/src/screens/Settings/AboutSettings.tsx index 76b08daaa0..e48841d9f0 100644 --- a/src/screens/Settings/AboutSettings.tsx +++ b/src/screens/Settings/AboutSettings.tsx @@ -22,11 +22,7 @@ import {Newspaper_Stroke2_Corner2_Rounded as NewspaperIcon} from '#/components/i import {Wrench_Stroke2_Corner2_Rounded as WrenchIcon} from '#/components/icons/Wrench' import * as Layout from '#/components/Layout' import {Loader} from '#/components/Loader' -import { - APP_METADATA as bundleInfo, - APP_VERSION as appVersion, - BUNDLE_DATE, -} from '#/env' +import * as env from '#/env' import {useDemoMode} from '#/storage/hooks/demo-mode' import {useDevMode} from '#/storage/hooks/dev-mode' import {OTAInfo} from './components/OTAInfo' @@ -127,7 +123,7 @@ export function AboutSettingsScreen({}: Props) { )} { const newDevModeEnabled = !devModeEnabled @@ -150,15 +146,15 @@ export function AboutSettingsScreen({}: Props) { }} onPress={() => { setStringAsync( - `Build version: ${appVersion}; Bundle info: ${bundleInfo}; Bundle date: ${BUNDLE_DATE}; Platform: ${Platform.OS}; Platform version: ${Platform.Version}; Anonymous ID: ${stableID}`, + `Build version: ${env.APP_VERSION}; Bundle info: ${env.APP_METADATA}; Bundle date: ${env.BUNDLE_DATE}; Platform: ${Platform.OS}; Platform version: ${Platform.Version}; Anonymous ID: ${stableID}`, ) Toast.show(_(msg`Copied build version to clipboard`)) }}> - Version {appVersion} + Version {env.APP_VERSION} - {bundleInfo} + {env.APP_METADATA} {devModeEnabled && ( <>