about summary refs log tree commit diff
path: root/src/lib/app-info.web.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/app-info.web.ts')
-rw-r--r--src/lib/app-info.web.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/app-info.web.ts b/src/lib/app-info.web.ts
index 5739b8783..9a83953c1 100644
--- a/src/lib/app-info.web.ts
+++ b/src/lib/app-info.web.ts
@@ -1,2 +1,16 @@
 import {version} from '../../package.json'
+
+export const IS_DEV = process.env.EXPO_PUBLIC_ENV === 'development'
+
+// 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.
+export const BUNDLE_IDENTIFIER = process.env.EXPO_PUBLIC_COMMIT_HASH ?? 'dev'
+
+// 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_DEV
+  ? 0
+  : Number(process.env.EXPO_PUBLIC_BUNDLE_DATE)
+
 export const appVersion = version
+export const bundleInfo = `${BUNDLE_IDENTIFIER} (${IS_DEV ? 'dev' : 'prod'})`