File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 18
18
```
19
19
20
20
- 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 ) )
21
22
22
23
### Fixes
23
24
Original file line number Diff line number Diff line change @@ -101,6 +101,15 @@ function groupAssets(assetPaths) {
101
101
return groups ;
102
102
}
103
103
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
+
104
113
let sentryOrg = getEnvVar ( SENTRY_ORG ) ;
105
114
let sentryProject = getEnvVar ( SENTRY_PROJECT ) ;
106
115
let authToken = getEnvVar ( SENTRY_AUTH_TOKEN ) ;
You can’t perform that action at this time.
0 commit comments