File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 1818 ```
1919
2020- Only upload Expo artifact if source map exists ([ #3568 ] ( https://github.com/getsentry/sentry-react-native/pull/3568 ) )
21+ - Read ` .env ` file in ` sentry-expo-upload-sourcemaps ` ([ #3571 ] ( https://github.com/getsentry/sentry-react-native/pull/3571 ) )
2122
2223### Fixes
2324
Original file line number Diff line number Diff line change @@ -101,6 +101,15 @@ function groupAssets(assetPaths) {
101101 return groups ;
102102}
103103
104+ process . env . NODE_ENV = process . env . NODE_ENV || 'development' ; // Ensures precedence .env.development > .env (the same as @expo/cli)
105+ const projectRoot = '.' ; // Assume script is run from the project root
106+ try {
107+ require ( '@expo/env' ) . load ( projectRoot ) ;
108+ } catch ( error ) {
109+ console . warn ( '⚠️ Failed to load environment variables using @expo/env.' ) ;
110+ console . warn ( error ) ;
111+ }
112+
104113let sentryOrg = getEnvVar ( SENTRY_ORG ) ;
105114let sentryProject = getEnvVar ( SENTRY_PROJECT ) ;
106115let authToken = getEnvVar ( SENTRY_AUTH_TOKEN ) ;
You can’t perform that action at this time.
0 commit comments