2024-04-05 06:19:28 +02:00
|
|
|
import {nativeApplicationVersion, nativeBuildVersion} from 'expo-application'
|
2023-06-02 22:27:59 +02:00
|
|
|
|
2024-04-16 23:38:25 +02:00
|
|
|
export const BUILD_ENV = process.env.EXPO_PUBLIC_ENV
|
2024-04-04 00:14:44 +02:00
|
|
|
export const IS_DEV = process.env.EXPO_PUBLIC_ENV === 'development'
|
|
|
|
export const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight'
|
|
|
|
|
2024-05-05 01:33:10 +02:00
|
|
|
// This is the commit hash that the current bundle was made from. The user can see the commit hash in the app's settings
|
|
|
|
// along with the other version info. Useful for debugging/reporting.
|
2024-05-07 05:13:12 +02:00
|
|
|
export const BUNDLE_IDENTIFIER = process.env.EXPO_PUBLIC_BUNDLE_IDENTIFIER ?? ''
|
2024-05-05 01:33:10 +02:00
|
|
|
|
|
|
|
// This will always be in the format of YYMMDD, so that it always increases for each build. This should only be used
|
|
|
|
// for Statsig reporting and shouldn't be used to identify a specific bundle.
|
|
|
|
export const BUNDLE_DATE =
|
|
|
|
IS_TESTFLIGHT || IS_DEV ? 0 : Number(process.env.EXPO_PUBLIC_BUNDLE_DATE)
|
|
|
|
|
|
|
|
export const appVersion = `${nativeApplicationVersion}.${nativeBuildVersion}`
|
|
|
|
export const bundleInfo = `${BUNDLE_IDENTIFIER} (${
|
|
|
|
IS_DEV ? 'dev' : IS_TESTFLIGHT ? 'tf' : 'prod'
|
2024-04-05 06:19:28 +02:00
|
|
|
})`
|