From 080033a011433bffbeec03ede9c6acfcfbe9feb4 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Thu, 12 Dec 2024 03:25:39 +0000 Subject: [PATCH] Make sure local web builds set debug environment flag --- .env.example | 1 - src/lib/app-info.ts | 4 ++-- src/lib/app-info.web.ts | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.env.example b/.env.example index 6ab02256e4..8cbc590c94 100644 --- a/.env.example +++ b/.env.example @@ -1,7 +1,6 @@ # Copy this to `.env` and `.env.test` files SENTRY_AUTH_TOKEN= -EXPO_PUBLIC_ENV=development EXPO_PUBLIC_LOG_LEVEL=debug EXPO_PUBLIC_LOG_DEBUG= EXPO_PUBLIC_BUNDLE_IDENTIFIER= diff --git a/src/lib/app-info.ts b/src/lib/app-info.ts index 4da70d75d8..e74351ae3f 100644 --- a/src/lib/app-info.ts +++ b/src/lib/app-info.ts @@ -1,7 +1,7 @@ import {nativeApplicationVersion, nativeBuildVersion} from 'expo-application' -export const BUILD_ENV = process.env.EXPO_PUBLIC_ENV -export const IS_DEV = process.env.EXPO_PUBLIC_ENV === 'development' +export const BUILD_ENV = process.env.EXPO_PUBLIC_ENV || 'development' +export const IS_DEV = process.env.EXPO_PUBLIC_ENV !== 'production' export const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight' export const IS_INTERNAL = IS_DEV || IS_TESTFLIGHT diff --git a/src/lib/app-info.web.ts b/src/lib/app-info.web.ts index 742ccfe975..9380729542 100644 --- a/src/lib/app-info.web.ts +++ b/src/lib/app-info.web.ts @@ -1,7 +1,7 @@ import {version} from '../../package.json' -export const BUILD_ENV = process.env.EXPO_PUBLIC_ENV -export const IS_DEV = process.env.EXPO_PUBLIC_ENV === 'development' +export const BUILD_ENV = process.env.EXPO_PUBLIC_ENV || 'development' +export const IS_DEV = process.env.EXPO_PUBLIC_ENV !== 'production' export const IS_TESTFLIGHT = false export const IS_INTERNAL = IS_DEV