diff options
author | Hailey <me@haileyok.com> | 2024-05-04 16:33:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-04 16:33:10 -0700 |
commit | 4862bc2ba85a91d885b4bd116f25b6533ab568d0 (patch) | |
tree | bfc82f2cbb27ca6e81f3858dd61d1a8e26818341 /src/lib/app-info.ts | |
parent | eb55bdf172d8b3f405fb6e7d8235aaf7be393bd2 (diff) | |
download | voidsky-4862bc2ba85a91d885b4bd116f25b6533ab568d0.tar.zst |
add bundle identifiers to app-info (#3861)
* add bundle identifiers to `app-info` * add them to the `.env.example` * add environment variables for docker build * add environment variables for native builds and bundles * also include the hour in bundle date * organize app info better in settings
Diffstat (limited to 'src/lib/app-info.ts')
-rw-r--r-- | src/lib/app-info.ts | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/lib/app-info.ts b/src/lib/app-info.ts index af265bfcb..47c57d171 100644 --- a/src/lib/app-info.ts +++ b/src/lib/app-info.ts @@ -4,7 +4,16 @@ 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' -const UPDATES_CHANNEL = IS_TESTFLIGHT ? 'testflight' : 'production' -export const appVersion = `${nativeApplicationVersion} (${nativeBuildVersion}, ${ - IS_DEV ? 'development' : UPDATES_CHANNEL +// 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_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' })` |