mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
0
fork

Configure Feed

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

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

authored by hailey.at and committed by

GitHub 4862bc2b eb55bdf1

+53 -23
+2
.env.example
··· 4 4 EXPO_PUBLIC_ENV=development 5 5 EXPO_PUBLIC_LOG_LEVEL=debug 6 6 EXPO_PUBLIC_LOG_DEBUG= 7 + EXPO_PUBLIC_BUNDLE_IDENTIFIER= 8 + EXPO_PUBLIC_BUNDLE_DATE=0
+4 -1
.github/workflows/build-and-push-bskyweb-aws.yaml
··· 1 1 name: build-and-push-bskyweb-aws 2 2 on: 3 + workflow_dispatch: 3 4 push: 4 5 branches: 5 6 - main 6 - - 3p-moderators 7 7 8 8 env: 9 9 REGISTRY: ${{ secrets.AWS_ECR_REGISTRY_USEAST2_PACKAGES_REGISTRY }} ··· 54 54 labels: ${{ steps.meta.outputs.labels }} 55 55 cache-from: type=gha 56 56 cache-to: type=gha,mode=max 57 + env: 58 + EXPO_PUBLIC_BUNDLE_IDENTIFIER: $(git rev-parse --short HEAD) 59 + EXPO_PUBLIC_BUNDLE_DATE: $(date -u +"%y%m%d%H")
+2
.github/workflows/build-submit-android.yml
··· 57 57 run: | 58 58 export json='${{ secrets.GOOGLE_SERVICES_TOKEN }}' 59 59 echo "${{ secrets.ENV_TOKEN }}" > .env 60 + echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse --short HEAD)" >> .env 61 + echo "EXPO_PUBLIC_BUNDLE_DATE=$(date -u +"%y%m%d%H")" >> .env 60 62 echo "$json" > google-services.json 61 63 62 64 - name: 🏗️ EAS Build
+2
.github/workflows/build-submit-ios.yml
··· 65 65 - name: ✏️ Write environment variables 66 66 run: | 67 67 echo "${{ secrets.ENV_TOKEN }}" > .env 68 + echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse --short HEAD)" >> .env 69 + echo "EXPO_PUBLIC_BUNDLE_DATE=$(date -u +"%y%m%d%H")" >> .env 68 70 echo "${{ secrets.GOOGLE_SERVICES_TOKEN }}" > google-services.json 69 71 70 72 - name: 🏗️ EAS Build
+6
.github/workflows/bundle-deploy-eas-update.yml
··· 144 144 run: | 145 145 export json='${{ secrets.GOOGLE_SERVICES_TOKEN }}' 146 146 echo "${{ secrets.ENV_TOKEN }}" > .env 147 + echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse --short HEAD)" >> .env 148 + echo "EXPO_PUBLIC_BUNDLE_DATE=$(date -u +"%y%m%d%H")" >> .env 147 149 echo "$json" > google-services.json 148 150 149 151 - name: 🏗️ Create Bundle ··· 222 224 - name: ✏️ Write environment variables 223 225 run: | 224 226 echo "${{ secrets.ENV_TOKEN }}" > .env 227 + echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse --short HEAD)" >> .env 228 + echo "EXPO_PUBLIC_BUNDLE_DATE=$(date -u +"%y%m%d%H")" >> .env 225 229 echo "${{ secrets.GOOGLE_SERVICES_TOKEN }}" > google-services.json 226 230 227 231 - name: 🏗️ EAS Build ··· 283 287 run: | 284 288 export json='${{ secrets.GOOGLE_SERVICES_TOKEN }}' 285 289 echo "${{ secrets.ENV_TOKEN }}" > .env 290 + echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse --short HEAD)" >> .env 291 + echo "EXPO_PUBLIC_BUNDLE_DATE=$(date -u +"%y%m%d%H")" >> .env 286 292 echo "$json" > google-services.json 287 293 288 294 - name: 🏗️ EAS Build
+12 -3
src/lib/app-info.ts
··· 4 4 export const IS_DEV = process.env.EXPO_PUBLIC_ENV === 'development' 5 5 export const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight' 6 6 7 - const UPDATES_CHANNEL = IS_TESTFLIGHT ? 'testflight' : 'production' 8 - export const appVersion = `${nativeApplicationVersion} (${nativeBuildVersion}, ${ 9 - IS_DEV ? 'development' : UPDATES_CHANNEL 7 + // This is the commit hash that the current bundle was made from. The user can see the commit hash in the app's settings 8 + // along with the other version info. Useful for debugging/reporting. 9 + export const BUNDLE_IDENTIFIER = process.env.EXPO_PUBLIC_COMMIT_HASH ?? 'dev' 10 + 11 + // This will always be in the format of YYMMDD, so that it always increases for each build. This should only be used 12 + // for Statsig reporting and shouldn't be used to identify a specific bundle. 13 + export const BUNDLE_DATE = 14 + IS_TESTFLIGHT || IS_DEV ? 0 : Number(process.env.EXPO_PUBLIC_BUNDLE_DATE) 15 + 16 + export const appVersion = `${nativeApplicationVersion}.${nativeBuildVersion}` 17 + export const bundleInfo = `${BUNDLE_IDENTIFIER} (${ 18 + IS_DEV ? 'dev' : IS_TESTFLIGHT ? 'tf' : 'prod' 10 19 })`
+14
src/lib/app-info.web.ts
··· 1 1 import {version} from '../../package.json' 2 + 3 + export const IS_DEV = process.env.EXPO_PUBLIC_ENV === 'development' 4 + 5 + // This is the commit hash that the current bundle was made from. The user can see the commit hash in the app's settings 6 + // along with the other version info. Useful for debugging/reporting. 7 + export const BUNDLE_IDENTIFIER = process.env.EXPO_PUBLIC_COMMIT_HASH ?? 'dev' 8 + 9 + // This will always be in the format of YYMMDD, so that it always increases for each build. This should only be used 10 + // for Statsig reporting and shouldn't be used to identify a specific bundle. 11 + export const BUNDLE_DATE = IS_DEV 12 + ? 0 13 + : Number(process.env.EXPO_PUBLIC_BUNDLE_DATE) 14 + 2 15 export const appVersion = version 16 + export const bundleInfo = `${BUNDLE_IDENTIFIER} (${IS_DEV ? 'dev' : 'prod'})`
+11 -19
src/view/screens/Settings/index.tsx
··· 1 1 import React from 'react' 2 2 import { 3 - Linking, 4 3 Platform, 5 4 Pressable, 6 5 StyleSheet, ··· 40 39 import {useLoggedOutViewControls} from '#/state/shell/logged-out' 41 40 import {useCloseAllActiveElements} from '#/state/util' 42 41 import {useAnalytics} from 'lib/analytics/analytics' 43 - import * as AppInfo from 'lib/app-info' 42 + import {appVersion, BUNDLE_DATE, bundleInfo} from 'lib/app-info' 44 43 import {STATUS_PAGE_URL} from 'lib/constants' 45 44 import {useAccountSwitcher} from 'lib/hooks/useAccountSwitcher' 46 45 import {useCustomPalette} from 'lib/hooks/useCustomPalette' ··· 256 255 257 256 const onPressBuildInfo = React.useCallback(() => { 258 257 setStringAsync( 259 - `Build version: ${AppInfo.appVersion}; Platform: ${Platform.OS}`, 258 + `Build version: ${appVersion}; Bundle info: ${bundleInfo}; Bundle date: ${BUNDLE_DATE}; Platform: ${Platform.OS}`, 260 259 ) 261 260 Toast.show(_(msg`Copied build version to clipboard`)) 262 261 }, [_]) ··· 292 291 const onPressAccessibilitySettings = React.useCallback(() => { 293 292 navigation.navigate('AccessibilitySettings') 294 293 }, [navigation]) 295 - 296 - const onPressStatusPage = React.useCallback(() => { 297 - Linking.openURL(STATUS_PAGE_URL) 298 - }, []) 299 294 300 295 const onPressBirthday = React.useCallback(() => { 301 296 birthdayControl.open() ··· 870 865 accessibilityRole="button" 871 866 onPress={onPressBuildInfo}> 872 867 <Text type="sm" style={[styles.buildInfo, pal.textLight]}> 873 - <Trans>Version {AppInfo.appVersion}</Trans> 874 - </Text> 875 - </TouchableOpacity> 876 - <Text type="sm" style={[pal.textLight]}> 877 - &nbsp; &middot; &nbsp; 878 - </Text> 879 - <TouchableOpacity 880 - accessibilityRole="button" 881 - onPress={onPressStatusPage}> 882 - <Text type="sm" style={[styles.buildInfo, pal.textLight]}> 883 - <Trans>Status page</Trans> 868 + <Trans> 869 + Version {appVersion} {bundleInfo} 870 + </Trans> 884 871 </Text> 885 872 </TouchableOpacity> 886 873 </View> ··· 901 888 style={pal.link} 902 889 href="https://bsky.social/about/support/privacy-policy" 903 890 text={_(msg`Privacy Policy`)} 891 + /> 892 + <TextLink 893 + type="md" 894 + style={pal.link} 895 + href={STATUS_PAGE_URL} 896 + text={_(msg`Status Page`)} 904 897 /> 905 898 </View> 906 899 <View style={s.footerSpacer} /> ··· 1047 1040 footer: { 1048 1041 flex: 1, 1049 1042 flexDirection: 'row', 1050 - alignItems: 'center', 1051 1043 paddingLeft: 18, 1052 1044 }, 1053 1045 })