diff options
author | dan <dan.abramov@gmail.com> | 2024-12-13 17:16:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-13 17:16:53 +0000 |
commit | 356dad1932c3404f581b747127ae251dbe165bb3 (patch) | |
tree | d966d4c5fd4645f9897a984a018d7258399e1674 /src/lib/app-info.ts | |
parent | e2a7965e438db9f70d76d2d7a911aa4c4a42c122 (diff) | |
download | voidsky-356dad1932c3404f581b747127ae251dbe165bb3.tar.zst |
Remove the environment indirections (#7089)
* Use raw underlying globals for environment * Set dev EXPO_PUBLIC_ENV by exclusion
Diffstat (limited to 'src/lib/app-info.ts')
-rw-r--r-- | src/lib/app-info.ts | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/app-info.ts b/src/lib/app-info.ts index 4da70d75d..0749087ea 100644 --- a/src/lib/app-info.ts +++ b/src/lib/app-info.ts @@ -1,9 +1,7 @@ import {nativeApplicationVersion, nativeBuildVersion} from 'expo-application' -export const BUILD_ENV = process.env.EXPO_PUBLIC_ENV -export const IS_DEV = process.env.EXPO_PUBLIC_ENV === 'development' export const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight' -export const IS_INTERNAL = IS_DEV || IS_TESTFLIGHT +export const IS_INTERNAL = __DEV__ || IS_TESTFLIGHT // 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. @@ -12,9 +10,9 @@ export const BUNDLE_IDENTIFIER = process.env.EXPO_PUBLIC_BUNDLE_IDENTIFIER ?? '' // 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) + IS_TESTFLIGHT || __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' + __DEV__ ? 'dev' : IS_TESTFLIGHT ? 'tf' : 'prod' })` |