Bluesky app fork with some witchin' additions 💫

[APP-1173] Clean up env (#8701)

* Clean up env files

* Use new env in Sentry setup file

* Use new env in Bitdrift setup file

* Use new env in chat proxy header

* Prefix Bitdrift key with EXPO_PUBLIC

* Deprecate SENTRY_RELEASE since we use package.json now

* Use existing EXPO_PUBLIC_BUNDLE_IDENTIFIER short commit has as Sentry dist value

* Fix missing bundle identifier for Render deploys

* Deprecate SENTRY_DIST in favor of EXPO_PUBLIC_BUNDLE_IDENTIFIER

* Prefix SENTRY_DSN with EXPO_PUBLIC to match others

* Remove debugging field

* Replace NODE_ENV in places where its safe

* Self review

* Properly patch Sentry package

* Echo variables to .env in Dockerfile instead of passing to shell script

* Make sure EXPO_PUBLIC_ENV is set for web container builds

* Update IS_TESTFLIGHT to include testflight-android

* Slice bundle hash to match other platforms, needed for render.com deployments

* [APP-1331] Migrate `app-info` to new env (#8703)

* Move env files into directory with platform specific files

* Migrate usages of app-info to new env

* Fix bad import

* Update BUNDLE_DATE format comment

* Trim RENDER_GIT_COMMIT to first 7 to match --short sha

* Clarify build process env vars and ensure they are explicitly passed in

* Revert Sentry patch as a result of prev commit

* Update webpack Sentry dist value based on prev commits

* Add PACKAGE_VERSION and replace in statsig to fix conflict

* Fix render substitution syntax

* Remove invalid syntax

* Remove unnecessary testflight check

* Just use long commit hash

* Slice full hash for display in app

* Fix missing space in ios workflow

* Pass in sentry CLI env vars, align matching values

* Align on RELEASE_VERSION

* Add new env setup to missed OTA spot

* Update webpack to use same SENTRY_RELEASE var

* Just fallback to package version for Render deploys

* Remove TF check for BUNDLE_DATE

* Set EXPO_PUBLIC_ENV for bundle update

* Consistent naming "Env"

* Add comment

* Use RELEASE_VERSION instead of package.json

* Update PR comment CI

authored by Eric Bailey and committed by GitHub d4b23d3a db7bdae5

+29 -5
.env.example
··· 1 - # Copy this to `.env` and `.env.test` files 1 + # The env the app is running in e.g. development, testflight, production 2 + EXPO_PUBLIC_ENV=development 3 + 4 + # This is the semver release version of the app, pulled from package.json 5 + EXPO_PUBLIC_RELEASE_VERSION= 2 6 3 - BITDRIFT_API_KEY= 4 - SENTRY_AUTH_TOKEN= 5 - EXPO_PUBLIC_LOG_LEVEL=debug 6 - EXPO_PUBLIC_LOG_DEBUG= 7 + # This is the commit hash that the current bundle was made from. 7 8 EXPO_PUBLIC_BUNDLE_IDENTIFIER= 9 + 10 + # Should be formatted YYMMDDHH so that it increases for each build. 8 11 EXPO_PUBLIC_BUNDLE_DATE=0 12 + 13 + # The log level for the app's logger transports 14 + EXPO_PUBLIC_LOG_LEVEL=debug 15 + 16 + # Enable debug logs for specific logger instances 17 + EXPO_PUBLIC_LOG_DEBUG=session 18 + 19 + # Chat service DID 20 + EXPO_PUBLIC_CHAT_PROXY_DID= 21 + 22 + # 23 + # 24 + # Bluesky specific values 25 + # 26 + # 27 + 28 + # Sentry DSN for telemetry 29 + EXPO_PUBLIC_SENTRY_DSN= 30 + 31 + # Bitdrift API key. If undefined, Bitdrift will be disabled. 32 + EXPO_PUBLIC_BITDRIFT_API_KEY=
+8 -9
.github/workflows/build-and-push-bskyweb-aws.yaml
··· 43 43 tags: | 44 44 type=sha,enable=true,priority=100,prefix=,suffix=,format=long 45 45 46 - - name: Set outputs 47 - id: vars 46 + - name: Env 47 + id: env 48 48 run: | 49 - echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT 50 - echo "SENTRY_DIST=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT 51 - echo "SENTRY_RELEASE=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT 49 + echo "EXPO_PUBLIC_RELEASE_VERSION=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT 50 + echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT 52 51 53 52 - name: Build and push Docker image 54 53 id: build-and-push ··· 62 61 cache-from: type=gha 63 62 cache-to: type=gha,mode=max 64 63 build-args: | 65 - EXPO_PUBLIC_BUNDLE_IDENTIFIER=${{ steps.vars.outputs.sha_short }} 66 - SENTRY_DIST=${{ steps.vars.outputs.SENTRY_DIST }} 67 - SENTRY_RELEASE=${{ steps.vars.outputs.SENTRY_RELEASE }} 64 + EXPO_PUBLIC_ENV=production 65 + EXPO_PUBLIC_RELEASE_VERSION=${{ steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} 66 + EXPO_PUBLIC_BUNDLE_IDENTIFIER=${{ steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} 67 + EXPO_PUBLIC_SENTRY_DSN=${{ secrets.SENTRY_DSN }} 68 68 SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} 69 - SENTRY_DSN=${{ secrets.SENTRY_DSN }}
+25 -11
.github/workflows/build-submit-android.yml
··· 62 62 - name: Check for i18n compilation errors 63 63 run: if grep -q "invalid syntax" "i18n.log"; then echo "\n\nFound compilation errors!\n\n" && exit 1; else echo "\n\nNo compilation errors!\n\n"; fi 64 64 65 - - name: ✏️ Write environment variables 65 + # EXPO_PUBLIC_ENV is handled in eas.json 66 + - name: Env 67 + id: env 66 68 run: | 67 69 export json='${{ secrets.GOOGLE_SERVICES_TOKEN }}' 68 70 echo "${{ secrets.ENV_TOKEN }}" > .env 69 - echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse --short HEAD)" >> .env 71 + echo "EXPO_PUBLIC_RELEASE_VERSION=$(jq -r '.version' package.json)" >> .env 72 + echo "EXPO_PUBLIC_RELEASE_VERSION=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT 73 + echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse HEAD)" >> .env 74 + echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT 70 75 echo "EXPO_PUBLIC_BUNDLE_DATE=$(date -u +"%y%m%d%H")" >> .env 71 - echo "BITDRIFT_API_KEY=${{ secrets.BITDRIFT_API_KEY }}" >> .env 76 + echo "EXPO_PUBLIC_SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> .env 77 + echo "EXPO_PUBLIC_BITDRIFT_API_KEY=${{ secrets.BITDRIFT_API_KEY }}" >> .env 72 78 echo "$json" > google-services.json 73 79 74 - - name: Setup Sentry vars for build-time injection 75 - id: sentry 76 - run: | 77 - echo "SENTRY_DIST=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT 78 - echo "SENTRY_RELEASE=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT 79 - 80 80 - name: 🏗️ EAS Build 81 - run: SENTRY_DIST=${{ steps.sentry.outputs.SENTRY_DIST }} SENTRY_RELEASE=${{ steps.sentry.outputs.SENTRY_RELEASE }} SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_DSN=${{ secrets.SENTRY_DSN }} yarn use-build-number-with-bump eas build -p android --profile ${{ inputs.profile || 'testflight-android' }} --local --output build.aab --non-interactive 81 + run: > 82 + SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} 83 + SENTRY_RELEASE=${{ steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} 84 + SENTRY_DIST=${{ steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} 85 + yarn use-build-number-with-bump 86 + eas build -p android 87 + --profile ${{ inputs.profile || 'testflight-android' }} 88 + --local --output build.aab --non-interactive 82 89 83 90 - name: ✍️ Rename Testflight bundle 84 91 if: ${{ inputs.profile != 'production' }} ··· 140 147 141 148 - name: 🏗️ Build Production APK 142 149 if: ${{ inputs.profile == 'production' }} 143 - run: SENTRY_DIST=${{ steps.sentry.outputs.SENTRY_DIST }} SENTRY_RELEASE=${{ steps.sentry.outputs.SENTRY_RELEASE }} SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_DSN=${{ secrets.SENTRY_DSN }} yarn use-build-number-with-bump eas build -p android --profile production-apk --local --output build.apk --non-interactive 150 + run: > 151 + SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} 152 + SENTRY_RELEASE=${{ steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} 153 + SENTRY_DIST=${{ steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} 154 + yarn use-build-number-with-bump 155 + eas build -p android 156 + --profile production-apk 157 + --local --output build.apk --non-interactive 144 158 145 159 - name: 🚀 Upload Production APK Artifact 146 160 id: upload-artifact-production-apk
+16 -9
.github/workflows/build-submit-ios.yml
··· 75 75 - name: Check for i18n compilation errors 76 76 run: if grep -q "invalid syntax" "i18n.log"; then echo "\n\nFound compilation errors!\n\n" && exit 1; else echo "\n\nNo compilation errors!\n\n"; fi 77 77 78 + # EXPO_PUBLIC_ENV is handled in eas.json 78 79 - name: ✏️ Write environment variables 80 + id: env 79 81 run: | 80 82 echo "${{ secrets.ENV_TOKEN }}" > .env 81 - echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse --short HEAD)" >> .env 83 + echo "EXPO_PUBLIC_RELEASE_VERSION=$(jq -r '.version' package.json)" >> .env 84 + echo "EXPO_PUBLIC_RELEASE_VERSION=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT 85 + echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse HEAD)" >> .env 86 + echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT 82 87 echo "EXPO_PUBLIC_BUNDLE_DATE=$(date -u +"%y%m%d%H")" >> .env 83 - echo "BITDRIFT_API_KEY=${{ secrets.BITDRIFT_API_KEY }}" >> .env 88 + echo "EXPO_PUBLIC_SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> .env 89 + echo "EXPO_PUBLIC_BITDRIFT_API_KEY=${{ secrets.BITDRIFT_API_KEY }}" >> .env 84 90 echo "${{ secrets.GOOGLE_SERVICES_TOKEN }}" > google-services.json 85 91 86 - - name: Setup Sentry vars for build-time injection 87 - id: sentry 88 - run: | 89 - echo "SENTRY_DIST=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT 90 - echo "SENTRY_RELEASE=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT 91 - 92 92 - name: 🏗️ EAS Build 93 - run: SENTRY_DIST=${{ steps.sentry.outputs.SENTRY_DIST }} SENTRY_RELEASE=${{ steps.sentry.outputs.SENTRY_RELEASE }} SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_DSN=${{ secrets.SENTRY_DSN }} yarn use-build-number-with-bump eas build -p ios --profile ${{ inputs.profile || 'testflight' }} --local --output build.ipa --non-interactive 93 + run: > 94 + SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} 95 + SENTRY_RELEASE=${{ steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} 96 + SENTRY_DIST=${{ steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} 97 + yarn use-build-number-with-bump 98 + eas build -p ios 99 + --profile ${{ inputs.profile || 'testflight' }} 100 + --local --output build.ipa --non-interactive 94 101 95 102 - name: 🚀 Deploy 96 103 run: eas submit -p ios --non-interactive --path build.ipa
+49 -18
.github/workflows/bundle-deploy-eas-update.yml
··· 101 101 if: ${{ !steps.fingerprint.outputs.includes-changes }} 102 102 uses: dcarbone/install-jq-action@v2 103 103 104 - - name: ✏️ Write environment variables 104 + # eas.json not used here, set EXPO_PUBLIC_ENV 105 + - name: Env 106 + id: env 105 107 if: ${{ !steps.fingerprint.outputs.includes-changes }} 106 108 run: | 107 109 export json='${{ secrets.GOOGLE_SERVICES_TOKEN }}' 108 110 echo "${{ secrets.ENV_TOKEN }}" > .env 109 - echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse --short HEAD)" >> .env 111 + echo "EXPO_PUBLIC_ENV=${{ inputs.channel || 'testflight' }}" >> .env 112 + echo "EXPO_PUBLIC_RELEASE_VERSION=$(jq -r '.version' package.json)" >> .env 113 + echo "EXPO_PUBLIC_RELEASE_VERSION=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT 114 + echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse HEAD)" >> .env 115 + echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT 110 116 echo "EXPO_PUBLIC_BUNDLE_DATE=$(date -u +"%y%m%d%H")" >> .env 111 - echo "BITDRIFT_API_KEY=${{ secrets.BITDRIFT_API_KEY }}" >> .env 117 + echo "EXPO_PUBLIC_SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> .env 118 + echo "EXPO_PUBLIC_BITDRIFT_API_KEY=${{ secrets.BITDRIFT_API_KEY }}" >> .env 112 119 echo "$json" > google-services.json 113 120 114 - - name: Setup Sentry vars for build-time injection 115 - id: sentry 116 - run: | 117 - echo "SENTRY_DIST=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT 118 - echo "SENTRY_RELEASE=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT 119 - 120 121 - name: 🏗️ Create Bundle 121 122 if: ${{ !steps.fingerprint.outputs.includes-changes }} 122 - run: SENTRY_DIST=${{ steps.sentry.outputs.SENTRY_DIST }} SENTRY_RELEASE=${{ steps.sentry.outputs.SENTRY_RELEASE }} SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_DSN=${{ secrets.SENTRY_DSN }} EXPO_PUBLIC_ENV="${{ inputs.channel || 'testflight' }}" yarn export 123 + run: > 124 + SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} 125 + SENTRY_RELEASE=${{ steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} 126 + SENTRY_DIST=${{ steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} 127 + yarn export 123 128 124 129 - name: 📦 Package Bundle and 🚀 Deploy 125 130 if: ${{ !steps.fingerprint.outputs.includes-changes }} ··· 205 210 - name: 🔤 Compile translations 206 211 run: yarn intl:build 207 212 208 - - name: ✏️ Write environment variables 213 + # EXPO_PUBLIC_ENV is handled in eas.json 214 + - name: Env 215 + id: env 209 216 run: | 210 217 echo "${{ secrets.ENV_TOKEN }}" > .env 211 - echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse --short HEAD)" >> .env 218 + echo "EXPO_PUBLIC_RELEASE_VERSION=$(jq -r '.version' package.json)" >> .env 219 + echo "EXPO_PUBLIC_RELEASE_VERSION=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT 220 + echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse HEAD)" >> .env 221 + echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT 212 222 echo "EXPO_PUBLIC_BUNDLE_DATE=$(date -u +"%y%m%d%H")" >> .env 213 - echo "BITDRIFT_API_KEY=${{ secrets.BITDRIFT_API_KEY }}" >> .env 223 + echo "EXPO_PUBLIC_SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> .env 224 + echo "EXPO_PUBLIC_BITDRIFT_API_KEY=${{ secrets.BITDRIFT_API_KEY }}" >> .env 214 225 echo "${{ secrets.GOOGLE_SERVICES_TOKEN }}" > google-services.json 215 226 216 227 - name: 🏗️ EAS Build 217 - run: yarn use-build-number-with-bump eas build -p ios --profile testflight --local --output build.ipa --non-interactive 228 + run: > 229 + SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} 230 + SENTRY_RELEASE=${{ steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} 231 + SENTRY_DIST=${{ steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} 232 + yarn use-build-number-with-bump 233 + eas build -p ios 234 + --profile testflight 235 + --local --output build.ipa --non-interactive 218 236 219 237 - name: 🚀 Deploy 220 238 run: eas submit -p ios --non-interactive --path build.ipa ··· 282 300 - name: 🔤 Compile translations 283 301 run: yarn intl:build 284 302 285 - - name: ✏️ Write environment variables 303 + # EXPO_PUBLIC_ENV is handled in eas.json 304 + - name: Env 305 + id: env 286 306 run: | 287 307 export json='${{ secrets.GOOGLE_SERVICES_TOKEN }}' 288 308 echo "${{ secrets.ENV_TOKEN }}" > .env 289 - echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse --short HEAD)" >> .env 309 + echo "EXPO_PUBLIC_RELEASE_VERSION=$(jq -r '.version' package.json)" >> .env 310 + echo "EXPO_PUBLIC_RELEASE_VERSION=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT 311 + echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse HEAD)" >> .env 312 + echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT 290 313 echo "EXPO_PUBLIC_BUNDLE_DATE=$(date -u +"%y%m%d%H")" >> .env 291 - echo "BITDRIFT_API_KEY=${{ secrets.BITDRIFT_API_KEY }}" >> .env 314 + echo "EXPO_PUBLIC_SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> .env 315 + echo "EXPO_PUBLIC_BITDRIFT_API_KEY=${{ secrets.BITDRIFT_API_KEY }}" >> .env 292 316 echo "$json" > google-services.json 293 317 294 318 - name: 🏗️ EAS Build 295 - run: yarn use-build-number-with-bump eas build -p android --profile testflight-android --local --output build.apk --non-interactive 319 + run: > 320 + SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} 321 + SENTRY_RELEASE=${{ steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} 322 + SENTRY_DIST=${{ steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} 323 + yarn use-build-number-with-bump 324 + eas build -p android 325 + --profile testflight-android 326 + --local --output build.apk --non-interactive 296 327 297 328 - name: ⏰ Get a timestamp 298 329 id: timestamp
+14 -10
.github/workflows/pull-request-comment.yml
··· 152 152 - name: 🪛 Setup jq 153 153 uses: dcarbone/install-jq-action@v2 154 154 155 - - name: ✏️ Write environment variables 155 + - name: Env 156 + id: env 156 157 run: | 157 158 export json='${{ secrets.GOOGLE_SERVICES_TOKEN }}' 158 159 echo "${{ secrets.ENV_TOKEN }}" > .env 159 - echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse --short HEAD)" >> .env 160 + echo "EXPO_PUBLIC_ENV=testflight" >> .env 161 + echo "EXPO_PUBLIC_RELEASE_VERSION=$(jq -r '.version' package.json)" >> .env 162 + echo "EXPO_PUBLIC_RELEASE_VERSION=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT 163 + echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse HEAD)" >> .env 164 + echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT 160 165 echo "EXPO_PUBLIC_BUNDLE_DATE=$(date -u +"%y%m%d%H")" >> .env 161 - echo "BITDRIFT_API_KEY=${{ secrets.BITDRIFT_API_KEY }}" >> .env 166 + echo "EXPO_PUBLIC_SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> .env 167 + echo "EXPO_PUBLIC_BITDRIFT_API_KEY=${{ secrets.BITDRIFT_API_KEY }}" >> .env 162 168 echo "$json" > google-services.json 163 169 164 - - name: Setup Sentry vars for build-time injection 165 - id: sentry 166 - run: | 167 - echo "SENTRY_DIST=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT 168 - echo "SENTRY_RELEASE=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT 169 - 170 170 - name: 🏗️ Create Bundle 171 - run: SENTRY_DIST=${{ steps.sentry.outputs.SENTRY_DIST }} SENTRY_RELEASE=${{ steps.sentry.outputs.SENTRY_RELEASE }} SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_DSN=${{ secrets.SENTRY_DSN }} EXPO_PUBLIC_ENV="testflight" yarn export 171 + run: > 172 + SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} 173 + SENTRY_RELEASE=${{ steps.env.outputs.EXPO_PUBLIC_RELEASE_VERSION }} 174 + SENTRY_DIST=${{ steps.env.outputs.EXPO_PUBLIC_BUNDLE_IDENTIFIER }} 175 + yarn export 172 176 173 177 - name: 📦 Package Bundle and 🚀 Deploy 174 178 run: yarn use-build-number bash scripts/bundleUpdate.sh
+16 -13
Dockerfile
··· 19 19 ENV CGO_ENABLED=1 20 20 ENV GOEXPERIMENT="loopvar" 21 21 22 + # The latest git hash of the preview branch on render.com 23 + # https://render.com/docs/docker-secrets#environment-variables-in-docker-builds 24 + ARG RENDER_GIT_COMMIT 25 + 22 26 # 23 27 # Expo 24 28 # 29 + ARG EXPO_PUBLIC_ENV 30 + ENV EXPO_PUBLIC_ENV=${EXPO_PUBLIC_ENV:-development} 31 + ARG EXPO_PUBLIC_RELEASE_VERSION 32 + ENV EXPO_PUBLIC_RELEASE_VERSION=$EXPO_PUBLIC_RELEASE_VERSION 25 33 ARG EXPO_PUBLIC_BUNDLE_IDENTIFIER 26 - ENV EXPO_PUBLIC_BUNDLE_IDENTIFIER=${EXPO_PUBLIC_BUNDLE_IDENTIFIER:-dev} 27 - 28 - # The latest git hash of the preview branch on render.com 29 - ARG RENDER_GIT_COMMIT 34 + # If not set by GitHub workflows, we're probably in Render 35 + ENV EXPO_PUBLIC_BUNDLE_IDENTIFIER=${EXPO_PUBLIC_BUNDLE_IDENTIFIER:-$RENDER_GIT_COMMIT} 30 36 31 37 # 32 38 # Sentry 33 39 # 34 40 ARG SENTRY_AUTH_TOKEN 35 41 ENV SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN:-unknown} 36 - # Will fall back to package.json#version, but this is handled elsewhere 37 - ARG SENTRY_RELEASE 38 - ENV SENTRY_RELEASE=$SENTRY_RELEASE 39 - ARG SENTRY_DIST 40 - # Default to RENDER_GIT_COMMIT if not set by GitHub workflows 41 - ENV SENTRY_DIST=${SENTRY_DIST:-$RENDER_GIT_COMMIT} 42 - ARG SENTRY_DSN 43 - ENV SENTRY_DSN=$SENTRY_DSN 42 + ARG EXPO_PUBLIC_SENTRY_DSN 43 + ENV EXPO_PUBLIC_SENTRY_DSN=$EXPO_PUBLIC_SENTRY_DSN 44 44 45 45 # 46 46 # Copy everything into the container ··· 60 60 nvm install $NODE_VERSION && \ 61 61 nvm use $NODE_VERSION && \ 62 62 echo "Using bundle identifier: $EXPO_PUBLIC_BUNDLE_IDENTIFIER" && \ 63 + echo "EXPO_PUBLIC_ENV=$EXPO_PUBLIC_ENV" >> .env && \ 64 + echo "EXPO_PUBLIC_RELEASE_VERSION=$EXPO_PUBLIC_RELEASE_VERSION" >> .env && \ 63 65 echo "EXPO_PUBLIC_BUNDLE_IDENTIFIER=$EXPO_PUBLIC_BUNDLE_IDENTIFIER" >> .env && \ 64 66 echo "EXPO_PUBLIC_BUNDLE_DATE=$(date -u +"%y%m%d%H")" >> .env && \ 67 + echo "EXPO_PUBLIC_SENTRY_DSN=$EXPO_PUBLIC_SENTRY_DSN" >> .env && \ 65 68 npm install --global yarn && \ 66 69 yarn && \ 67 70 yarn intl:build 2>&1 | tee i18n.log && \ 68 71 if grep -q "invalid syntax" "i18n.log"; then echo "\n\nFound compilation errors!\n\n" && exit 1; else echo "\n\nNo compile errors!\n\n"; fi && \ 69 - EXPO_PUBLIC_BUNDLE_IDENTIFIER=$EXPO_PUBLIC_BUNDLE_IDENTIFIER EXPO_PUBLIC_BUNDLE_DATE=$() SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN SENTRY_RELEASE=$SENTRY_RELEASE SENTRY_DIST=$SENTRY_DIST SENTRY_DSN=$SENTRY_DSN yarn build-web 72 + SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN SENTRY_RELEASE=$EXPO_PUBLIC_RELEASE_VERSION SENTRY_DIST=$EXPO_PUBLIC_BUNDLE_IDENTIFIER yarn build-web 70 73 71 74 # DEBUG 72 75 RUN find ./bskyweb/static && find ./web-build/static
+2 -2
docs/build.md
··· 89 89 90 90 ### Adding bitdrift 91 91 92 - Adding bitdirft is NOT required. You can keep `BITDRIFT_API_KEY=` in `.env` which will avoid initializing bitdrift during startup. 92 + Adding bitdrift is NOT required. You can keep `EXPO_PUBLIC_BITDRIFT_API_KEY=` in `.env` which will avoid initializing bitdrift during startup. 93 93 94 - However, if you're a part of the Bluesky team and want to enable bitdrift, fill in `BITDRIFT_API_KEY` in your `.env` to enable bitdrift. 94 + However, if you're a part of the Bluesky team and want to enable bitdrift, fill in `EXPO_PUBLIC_BITDRIFT_API_KEY` in your `.env` to enable bitdrift. 95 95 96 96 ### Adding and Updating Locales 97 97
+1 -1
src/components/PostControls/DiscoverDebug.tsx
··· 2 2 import * as Clipboard from 'expo-clipboard' 3 3 import {t} from '@lingui/macro' 4 4 5 - import {IS_INTERNAL} from '#/lib/app-info' 6 5 import {DISCOVER_DEBUG_DIDS} from '#/lib/constants' 7 6 import {useGate} from '#/lib/statsig/statsig' 8 7 import {useSession} from '#/state/session' 9 8 import * as Toast from '#/view/com/util/Toast' 10 9 import {atoms as a, useBreakpoints, useTheme} from '#/alf' 11 10 import {Text} from '#/components/Typography' 11 + import {IS_INTERNAL} from '#/env' 12 12 13 13 export function DiscoverDebug({ 14 14 feedContext,
+1 -1
src/components/PostControls/PostMenu/PostMenuItems.tsx
··· 17 17 import {useLingui} from '@lingui/react' 18 18 import {useNavigation} from '@react-navigation/native' 19 19 20 - import {IS_INTERNAL} from '#/lib/app-info' 21 20 import {DISCOVER_DEBUG_DIDS} from '#/lib/constants' 22 21 import {useOpenLink} from '#/lib/hooks/useOpenLink' 23 22 import {getCurrentRoute} from '#/lib/routes/helpers' ··· 83 82 useReportDialogControl, 84 83 } from '#/components/moderation/ReportDialog' 85 84 import * as Prompt from '#/components/Prompt' 85 + import {IS_INTERNAL} from '#/env' 86 86 import * as bsky from '#/types/bsky' 87 87 88 88 let PostMenuItems = ({
-6
src/env.ts
··· 1 - export const LOG_DEBUG = process.env.EXPO_PUBLIC_LOG_DEBUG || '' 2 - export const LOG_LEVEL = (process.env.EXPO_PUBLIC_LOG_LEVEL || 'info') as 3 - | 'debug' 4 - | 'info' 5 - | 'warn' 6 - | 'error'
+79
src/env/common.ts
··· 1 + import {type Did} from '@atproto/api' 2 + 3 + import packageJson from '#/../package.json' 4 + 5 + /** 6 + * The semver version of the app, as defined in `package.json.` 7 + * 8 + * N.B. The fallback is needed for Render.com deployments 9 + */ 10 + export const RELEASE_VERSION: string = 11 + process.env.EXPO_PUBLIC_RELEASE_VERSION || packageJson.version 12 + 13 + /** 14 + * The env the app is running in e.g. development, testflight, production 15 + */ 16 + export const ENV: string = process.env.EXPO_PUBLIC_ENV 17 + 18 + /** 19 + * Indicates whether the app is running in TestFlight 20 + */ 21 + export const IS_TESTFLIGHT = ENV === 'testflight' 22 + 23 + /** 24 + * Indicates whether the app is __DEV__ 25 + */ 26 + export const IS_DEV = __DEV__ 27 + 28 + /** 29 + * Indicates whether the app is __DEV__ or TestFlight 30 + */ 31 + export const IS_INTERNAL = IS_DEV || IS_TESTFLIGHT 32 + 33 + /** 34 + * The commit hash that the current bundle was made from. The user can 35 + * see the commit hash in the app's settings along with the other version info. 36 + * Useful for debugging/reporting. 37 + */ 38 + export const BUNDLE_IDENTIFIER: string = 39 + process.env.EXPO_PUBLIC_BUNDLE_IDENTIFIER || 'dev' 40 + 41 + /** 42 + * This will always be in the format of YYMMDDHH, so that it always increases 43 + * for each build. This should only be used for StatSig reporting and shouldn't 44 + * be used to identify a specific bundle. 45 + */ 46 + export const BUNDLE_DATE: number = !process.env.EXPO_PUBLIC_BUNDLE_DATE 47 + ? 0 48 + : Number(process.env.EXPO_PUBLIC_BUNDLE_DATE) 49 + 50 + /** 51 + * The log level for the app. 52 + */ 53 + export const LOG_LEVEL = (process.env.EXPO_PUBLIC_LOG_LEVEL || 'info') as 54 + | 'debug' 55 + | 'info' 56 + | 'warn' 57 + | 'error' 58 + 59 + /** 60 + * Enable debug logs for specific logger instances 61 + */ 62 + export const LOG_DEBUG: string = process.env.EXPO_PUBLIC_LOG_DEBUG || '' 63 + 64 + /** 65 + * The DID of the chat service to proxy to 66 + */ 67 + export const CHAT_PROXY_DID: Did = 68 + process.env.EXPO_PUBLIC_CHAT_PROXY_DID || 'did:web:api.bsky.chat' 69 + 70 + /** 71 + * Sentry DSN for telemetry 72 + */ 73 + export const SENTRY_DSN: string | undefined = process.env.EXPO_PUBLIC_SENTRY_DSN 74 + 75 + /** 76 + * Bitdrift API key. If undefined, Bitdrift should be disabled. 77 + */ 78 + export const BITDRIFT_API_KEY: string | undefined = 79 + process.env.EXPO_PUBLIC_BITDRIFT_API_KEY
+19
src/env/index.ts
··· 1 + import {nativeBuildVersion} from 'expo-application' 2 + 3 + import {BUNDLE_IDENTIFIER, IS_TESTFLIGHT, RELEASE_VERSION} from '#/env/common' 4 + 5 + export * from '#/env/common' 6 + 7 + /** 8 + * The semver version of the app, specified in our `package.json`.file. On 9 + * iOs/Android, the native build version is appended to the semver version, so 10 + * that it can be used to identify a specific build. 11 + */ 12 + export const APP_VERSION = `${RELEASE_VERSION}.${nativeBuildVersion}` 13 + 14 + /** 15 + * The short commit hash and environment of the current bundle. 16 + */ 17 + export const APP_METADATA = `${BUNDLE_IDENTIFIER.slice(0, 7)} (${ 18 + __DEV__ ? 'dev' : IS_TESTFLIGHT ? 'tf' : 'prod' 19 + })`
+15
src/env/index.web.ts
··· 1 + import {BUNDLE_IDENTIFIER, RELEASE_VERSION} from '#/env/common' 2 + 3 + export * from '#/env/common' 4 + 5 + /** 6 + * The semver version of the app, specified in our `package.json`.file. On 7 + * iOs/Android, the native build version is appended to the semver version, so 8 + * that it can be used to identify a specific build. 9 + */ 10 + export const APP_VERSION = RELEASE_VERSION 11 + 12 + /** 13 + * The short commit hash and environment of the current bundle. 14 + */ 15 + export const APP_METADATA = `${BUNDLE_IDENTIFIER.slice(0, 7)} (${__DEV__ ? 'dev' : 'prod'})`
-18
src/lib/app-info.ts
··· 1 - import {nativeApplicationVersion, nativeBuildVersion} from 'expo-application' 2 - 3 - export const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight' 4 - export const IS_INTERNAL = __DEV__ || IS_TESTFLIGHT 5 - 6 - // This is the commit hash that the current bundle was made from. The user can see the commit hash in the app's settings 7 - // along with the other version info. Useful for debugging/reporting. 8 - export const BUNDLE_IDENTIFIER = process.env.EXPO_PUBLIC_BUNDLE_IDENTIFIER ?? '' 9 - 10 - // This will always be in the format of YYMMDD, so that it always increases for each build. This should only be used 11 - // for Statsig reporting and shouldn't be used to identify a specific bundle. 12 - export const BUNDLE_DATE = 13 - IS_TESTFLIGHT || __DEV__ ? 0 : Number(process.env.EXPO_PUBLIC_BUNDLE_DATE) 14 - 15 - export const appVersion = `${nativeApplicationVersion}.${nativeBuildVersion}` 16 - export const bundleInfo = `${BUNDLE_IDENTIFIER} (${ 17 - __DEV__ ? 'dev' : IS_TESTFLIGHT ? 'tf' : 'prod' 18 - })`
-18
src/lib/app-info.web.ts
··· 1 - import packageDotJson from '../../package.json' 2 - 3 - export const IS_TESTFLIGHT = false 4 - export const IS_INTERNAL = __DEV__ 5 - 6 - // This is the commit hash that the current bundle was made from. The user can see the commit hash in the app's settings 7 - // along with the other version info. Useful for debugging/reporting. 8 - export const BUNDLE_IDENTIFIER = 9 - process.env.EXPO_PUBLIC_BUNDLE_IDENTIFIER ?? '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 = __DEV__ 14 - ? 0 15 - : Number(process.env.EXPO_PUBLIC_BUNDLE_DATE) 16 - 17 - export const appVersion = packageDotJson.version 18 - export const bundleInfo = `${BUNDLE_IDENTIFIER} (${__DEV__ ? 'dev' : 'prod'})`
+1 -1
src/lib/hooks/useOTAUpdates.ts
··· 10 10 useUpdates, 11 11 } from 'expo-updates' 12 12 13 - import {IS_TESTFLIGHT} from '#/lib/app-info' 14 13 import {logger} from '#/logger' 15 14 import {isIOS} from '#/platform/detection' 15 + import {IS_TESTFLIGHT} from '#/env' 16 16 17 17 const MINIMUM_MINIMIZE_TIME = 15 * 60e3 18 18
+9 -11
src/lib/statsig/statsig.tsx
··· 3 3 import {AppState, type AppStateStatus} from 'react-native' 4 4 import {Statsig, StatsigProvider} from 'statsig-react-native-expo' 5 5 6 - import {BUNDLE_DATE, BUNDLE_IDENTIFIER, IS_TESTFLIGHT} from '#/lib/app-info' 7 6 import {logger} from '#/logger' 8 7 import {type MetricEvents} from '#/logger/metrics' 9 8 import {isWeb} from '#/platform/detection' 10 9 import * as persisted from '#/state/persisted' 11 - import packageDotJson from '../../../package.json' 10 + import * as env from '#/env' 12 11 import {useSession} from '../../state/session' 13 12 import {timeout} from '../async/timeout' 14 13 import {useNonReactiveCallback} from '../hooks/useNonReactiveCallback' ··· 49 48 function createStatsigOptions(prefetchUsers: StatsigUser[]) { 50 49 return { 51 50 environment: { 52 - tier: 53 - process.env.NODE_ENV === 'development' 54 - ? 'development' 55 - : IS_TESTFLIGHT 56 - ? 'staging' 57 - : 'production', 51 + tier: env.IS_DEV 52 + ? 'development' 53 + : env.IS_TESTFLIGHT 54 + ? 'staging' 55 + : 'production', 58 56 }, 59 57 // Don't block on waiting for network. The fetched config will kick in on next load. 60 58 // This ensures the UI is always consistent and doesn't update mid-session. ··· 212 210 refSrc, 213 211 refUrl, 214 212 platform: Platform.OS as 'ios' | 'android' | 'web', 215 - appVersion: packageDotJson.version, 216 - bundleIdentifier: BUNDLE_IDENTIFIER, 217 - bundleDate: BUNDLE_DATE, 213 + appVersion: env.RELEASE_VERSION, 214 + bundleIdentifier: env.BUNDLE_IDENTIFIER, 215 + bundleDate: env.BUNDLE_DATE, 218 216 appLanguage: languagePrefs.appLanguage, 219 217 contentLanguages: languagePrefs.contentLanguages, 220 218 },
+1 -2
src/logger/bitdrift/setup/index.ts
··· 2 2 import {Statsig} from 'statsig-react-native-expo' 3 3 4 4 import {initPromise} from '#/lib/statsig/statsig' 5 - 6 - const BITDRIFT_API_KEY = process.env.BITDRIFT_API_KEY 5 + import {BITDRIFT_API_KEY} from '#/env' 7 6 8 7 initPromise.then(() => { 9 8 let isEnabled = false
+2 -1
src/logger/index.ts
··· 14 14 } from '#/logger/types' 15 15 import {enabledLogLevels} from '#/logger/util' 16 16 import {isNative} from '#/platform/detection' 17 + import {ENV} from '#/env' 17 18 18 19 const TRANSPORTS: Transport[] = (function configureTransports() { 19 - switch (process.env.NODE_ENV) { 20 + switch (ENV) { 20 21 case 'production': { 21 22 return [sentryTransport, isNative && bitdriftTransport].filter( 22 23 Boolean,
+6 -23
src/logger/sentry/setup/index.ts
··· 1 - /** 2 - * Importing these separately from `platform/detection` and `lib/app-info` to 3 - * avoid future conflicts and/or circular deps 4 - */ 5 - 6 1 import {init} from '@sentry/react-native' 7 2 8 - import pkgJson from '#/../package.json' 9 - 10 - /** 11 - * Examples: 12 - * - `dev` 13 - * - `1.99.0` 14 - */ 15 - const release = process.env.SENTRY_RELEASE || pkgJson.version 16 - 17 - /** 18 - * The latest deployed commit hash 19 - */ 20 - const dist = process.env.SENTRY_DIST || 'dev' 3 + import * as env from '#/env' 21 4 22 5 init({ 23 - enabled: !__DEV__ && !!process.env.SENTRY_DSN, 6 + enabled: !env.IS_DEV && !!env.SENTRY_DSN, 24 7 autoSessionTracking: false, 25 - dsn: process.env.SENTRY_DSN, 8 + dsn: env.SENTRY_DSN, 26 9 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 27 - environment: process.env.NODE_ENV, 28 - dist, 29 - release, 10 + environment: env.ENV, 11 + dist: env.BUNDLE_IDENTIFIER, 12 + release: env.RELEASE_VERSION, 30 13 ignoreErrors: [ 31 14 /* 32 15 * Unknown internals errors
+5 -5
src/screens/Settings/AboutSettings.tsx
··· 9 9 import {useMutation} from '@tanstack/react-query' 10 10 import {Statsig} from 'statsig-react-native-expo' 11 11 12 - import {appVersion, BUNDLE_DATE, bundleInfo} from '#/lib/app-info' 13 12 import {STATUS_PAGE_URL} from '#/lib/constants' 14 13 import {type CommonNavigatorParams} from '#/lib/routes/types' 15 14 import {isAndroid, isIOS, isNative} from '#/platform/detection' ··· 23 22 import {Wrench_Stroke2_Corner2_Rounded as WrenchIcon} from '#/components/icons/Wrench' 24 23 import * as Layout from '#/components/Layout' 25 24 import {Loader} from '#/components/Loader' 25 + import * as env from '#/env' 26 26 import {useDemoMode} from '#/storage/hooks/demo-mode' 27 27 import {useDevMode} from '#/storage/hooks/dev-mode' 28 28 import {OTAInfo} from './components/OTAInfo' ··· 123 123 </SettingsList.PressableItem> 124 124 )} 125 125 <SettingsList.PressableItem 126 - label={_(msg`Version ${appVersion}`)} 126 + label={_(msg`Version ${env.APP_VERSION}`)} 127 127 accessibilityHint={_(msg`Copies build version to clipboard`)} 128 128 onLongPress={() => { 129 129 const newDevModeEnabled = !devModeEnabled ··· 146 146 }} 147 147 onPress={() => { 148 148 setStringAsync( 149 - `Build version: ${appVersion}; Bundle info: ${bundleInfo}; Bundle date: ${BUNDLE_DATE}; Platform: ${Platform.OS}; Platform version: ${Platform.Version}; Anonymous ID: ${stableID}`, 149 + `Build version: ${env.APP_VERSION}; Bundle info: ${env.APP_METADATA}; Bundle date: ${env.BUNDLE_DATE}; Platform: ${Platform.OS}; Platform version: ${Platform.Version}; Anonymous ID: ${stableID}`, 150 150 ) 151 151 Toast.show(_(msg`Copied build version to clipboard`)) 152 152 }}> 153 153 <SettingsList.ItemIcon icon={WrenchIcon} /> 154 154 <SettingsList.ItemText> 155 - <Trans>Version {appVersion}</Trans> 155 + <Trans>Version {env.APP_VERSION}</Trans> 156 156 </SettingsList.ItemText> 157 - <SettingsList.BadgeText>{bundleInfo}</SettingsList.BadgeText> 157 + <SettingsList.BadgeText>{env.APP_METADATA}</SettingsList.BadgeText> 158 158 </SettingsList.PressableItem> 159 159 {devModeEnabled && ( 160 160 <>
+4 -4
src/screens/Settings/AppIconSettings/index.tsx
··· 3 3 import {msg, Trans} from '@lingui/macro' 4 4 import {useLingui} from '@lingui/react' 5 5 import * as DynamicAppIcon from '@mozzius/expo-dynamic-app-icon' 6 - import {NativeStackScreenProps} from '@react-navigation/native-stack' 6 + import {type NativeStackScreenProps} from '@react-navigation/native-stack' 7 7 8 - import {IS_INTERNAL} from '#/lib/app-info' 9 8 import {PressableScale} from '#/lib/custom-animations/PressableScale' 10 - import {CommonNavigatorParams} from '#/lib/routes/types' 9 + import {type CommonNavigatorParams} from '#/lib/routes/types' 11 10 import {useGate} from '#/lib/statsig/statsig' 12 11 import {isAndroid} from '#/platform/detection' 13 12 import {AppIconImage} from '#/screens/Settings/AppIconSettings/AppIconImage' 14 - import {AppIconSet} from '#/screens/Settings/AppIconSettings/types' 13 + import {type AppIconSet} from '#/screens/Settings/AppIconSettings/types' 15 14 import {useAppIconSets} from '#/screens/Settings/AppIconSettings/useAppIconSets' 16 15 import {atoms as a, useTheme} from '#/alf' 17 16 import * as Toggle from '#/components/forms/Toggle' 18 17 import * as Layout from '#/components/Layout' 19 18 import {Text} from '#/components/Typography' 19 + import {IS_INTERNAL} from '#/env' 20 20 21 21 type Props = NativeStackScreenProps<CommonNavigatorParams, 'AppIconSettings'> 22 22 export function AppIconSettingsScreen({}: Props) {
+1 -1
src/screens/Settings/AppearanceSettings.tsx
··· 8 8 import {msg, Trans} from '@lingui/macro' 9 9 import {useLingui} from '@lingui/react' 10 10 11 - import {IS_INTERNAL} from '#/lib/app-info' 12 11 import { 13 12 type CommonNavigatorParams, 14 13 type NativeStackScreenProps, ··· 26 25 import {TitleCase_Stroke2_Corner0_Rounded as Aa} from '#/components/icons/TitleCase' 27 26 import * as Layout from '#/components/Layout' 28 27 import {Text} from '#/components/Typography' 28 + import {IS_INTERNAL} from '#/env' 29 29 import * as SettingsList from './components/SettingsList' 30 30 31 31 type Props = NativeStackScreenProps<CommonNavigatorParams, 'AppearanceSettings'>
+1 -1
src/screens/Settings/Settings.tsx
··· 9 9 import {type NativeStackScreenProps} from '@react-navigation/native-stack' 10 10 11 11 import {useActorStatus} from '#/lib/actor-status' 12 - import {IS_INTERNAL} from '#/lib/app-info' 13 12 import {HELP_DESK_URL} from '#/lib/constants' 14 13 import {useAccountSwitcher} from '#/lib/hooks/useAccountSwitcher' 15 14 import {useApplyPullRequestOTAUpdate} from '#/lib/hooks/useOTAUpdates' ··· 66 65 shouldShowVerificationCheckButton, 67 66 VerificationCheckButton, 68 67 } from '#/components/verification/VerificationCheckButton' 68 + import {IS_INTERNAL} from '#/env' 69 69 import {useActivitySubscriptionsNudged} from '#/storage/hooks/activity-subscriptions-nudged' 70 70 71 71 type Props = NativeStackScreenProps<CommonNavigatorParams, 'Settings'>
+3 -1
src/state/queries/messages/const.ts
··· 1 + import {CHAT_PROXY_DID} from '#/env' 2 + 1 3 export const DM_SERVICE_HEADERS = { 2 - 'atproto-proxy': 'did:web:api.bsky.chat#bsky_chat', 4 + 'atproto-proxy': `${CHAT_PROXY_DID}#bsky_chat`, 3 5 }
+5 -5
src/state/session/logging.ts
··· 1 - import {AtpSessionData, AtpSessionEvent} from '@atproto/api' 1 + import {type AtpSessionData, type AtpSessionEvent} from '@atproto/api' 2 2 import {sha256} from 'js-sha256' 3 3 import {Statsig} from 'statsig-react-native-expo' 4 4 5 - import {IS_INTERNAL} from '#/lib/app-info' 6 - import {Schema} from '../persisted' 7 - import {Action, State} from './reducer' 8 - import {SessionAccount} from './types' 5 + import {IS_INTERNAL} from '#/env' 6 + import {type Schema} from '../persisted' 7 + import {type Action, type State} from './reducer' 8 + import {type SessionAccount} from './types' 9 9 10 10 type Reducer = (state: State, action: Action) => State 11 11
+1 -1
webpack.config.js
··· 53 53 project: 'app', 54 54 authToken: process.env.SENTRY_AUTH_TOKEN, 55 55 release: { 56 - // env is undefined for Render.com builds, fall back 56 + // fallback needed for Render.com deployments 57 57 name: process.env.SENTRY_RELEASE || version, 58 58 dist: process.env.SENTRY_DIST, 59 59 },