Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Better dist strings for Sentry (#3584)

* better version codes for sentry

* use a `.` to follow the same intended format as before

* ignore dist build number

authored by

Hailey and committed by
GitHub
69d37680 046e11de

+11 -18
+5 -6
app.config.js
··· 35 35 */ 36 36 const PLATFORM = process.env.EAS_BUILD_PLATFORM 37 37 38 - const DIST_BUILD_NUMBER = 39 - PLATFORM === 'android' 40 - ? process.env.BSKY_ANDROID_VERSION_CODE 41 - : process.env.BSKY_IOS_BUILD_NUMBER 42 - 43 38 const IS_DEV = process.env.EXPO_PUBLIC_ENV === 'development' 44 39 const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight' 45 40 const IS_PRODUCTION = process.env.EXPO_PUBLIC_ENV === 'production' ··· 50 45 ? 'production' 51 46 : undefined 52 47 const UPDATES_ENABLED = !!UPDATES_CHANNEL 48 + 49 + const SENTRY_DIST = `${PLATFORM}.${VERSION}.${IS_TESTFLIGHT ? 'tf' : ''}${ 50 + IS_DEV ? 'dev' : '' 51 + }` 53 52 54 53 return { 55 54 expo: { ··· 217 216 organization: 'blueskyweb', 218 217 project: 'react-native', 219 218 release: VERSION, 220 - dist: `${PLATFORM}.${VERSION}.${DIST_BUILD_NUMBER}`, 219 + dist: SENTRY_DIST, 221 220 }, 222 221 }, 223 222 ],
+1
src/lib/app-info.ts
··· 1 1 import {nativeApplicationVersion, nativeBuildVersion} from 'expo-application' 2 2 3 + export const BUILD_ENV = process.env.EXPO_PUBLIC_ENV 3 4 export const IS_DEV = process.env.EXPO_PUBLIC_ENV === 'development' 4 5 export const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight' 5 6
+5 -12
src/lib/sentry.ts
··· 5 5 6 6 import {Platform} from 'react-native' 7 7 import {nativeApplicationVersion, nativeBuildVersion} from 'expo-application' 8 - import * as info from 'expo-updates' 9 8 import {init} from 'sentry-expo' 10 9 11 - /** 12 - * Matches the build profile `channel` props in `eas.json` 13 - */ 14 - const buildChannel = (info.channel || 'development') as 15 - | 'development' 16 - | 'preview' 17 - | 'production' 10 + import {BUILD_ENV, IS_DEV, IS_TESTFLIGHT} from 'lib/app-info' 18 11 19 12 /** 20 13 * Examples: ··· 32 25 * - `ios.1.57.0.3` 33 26 * - `android.1.57.0.46` 34 27 */ 35 - const dist = `${Platform.OS}.${release}${ 36 - nativeBuildVersion ? `.${nativeBuildVersion}` : '' 37 - }` 28 + const dist = `${Platform.OS}.${nativeBuildVersion}.${ 29 + IS_TESTFLIGHT ? 'tf' : '' 30 + }${IS_DEV ? 'dev' : ''}` 38 31 39 32 init({ 40 33 autoSessionTracking: false, 41 34 dsn: 'https://05bc3789bf994b81bd7ce20c86ccd3ae@o4505071687041024.ingest.sentry.io/4505071690514432', 42 35 debug: false, // If `true`, Sentry will try to print out useful debugging information if something goes wrong with sending the event. Set it to `false` in production 43 36 enableInExpoDevelopment: false, // enable this to test in dev 44 - environment: buildChannel, 37 + environment: BUILD_ENV ?? 'development', 45 38 dist, 46 39 release, 47 40 })