Skip to content

Commit 30e2d76

Browse files
expo: sentry-expo-upload-sourcemaps no longer requires sentry url (#3915)
1 parent 3eb0938 commit 30e2d76

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
- Improve touch event component info if annotated with [`@sentry/babel-plugin-component-annotate`](https://www.npmjs.com/package/@sentry/babel-plugin-component-annotate) ([#3899](https://github.com/getsentry/sentry-react-native/pull/3899))
88

9+
### Fixes
10+
11+
- `sentry-expo-upload-sourcemaps` no longer requires Sentry url when uploading sourcemaps to `sentry.io` ([#3915](https://github.com/getsentry/sentry-react-native/pull/3915))
12+
913
### Dependencies
1014

1115
- Bump Cocoa SDK from v8.29.1 to v8.30.0 ([#3914](https://github.com/getsentry/sentry-react-native/pull/3914))

scripts/expo-upload-sourcemaps.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -149,16 +149,17 @@ if (!sentryOrg || !sentryProject || !sentryUrl) {
149149
console.log(`${SENTRY_PROJECT} resolved to ${sentryProject} from expo config.`);
150150
}
151151
if (!sentryUrl) {
152-
if (!pluginConfig.url) {
153-
console.error(
154-
`Could not resolve sentry url, set it in the environment variable ${SENTRY_URL} or in the '@sentry/react-native' plugin properties in your expo config.`,
152+
if (pluginConfig.url) {
153+
sentryUrl = pluginConfig.url;
154+
console.log(`${SENTRY_URL} resolved to ${sentryUrl} from expo config.`);
155+
}
156+
else {
157+
sentryUrl = `https://sentry.io/`;
158+
console.log(
159+
`Since it wasn't specified in the Expo config or environment variable, ${SENTRY_URL} now points to ${sentryUrl}.`
155160
);
156-
process.exit(1);
157161
}
158-
159-
sentryUrl = pluginConfig.url;
160-
console.log(`${SENTRY_URL} resolved to ${sentryUrl} from expo config.`);
161-
}
162+
}
162163
}
163164

164165
if (!authToken) {
@@ -210,8 +211,7 @@ if (numAssetsUploaded === totalAssets) {
210211
console.log('✅ Uploaded bundles and sourcemaps to Sentry successfully.');
211212
} else {
212213
console.warn(
213-
`⚠️ Uploaded ${numAssetsUploaded} of ${totalAssets} bundles and sourcemaps. ${
214-
numAssetsUploaded === 0 ? 'Ensure you are running `expo export` with the `--dump-sourcemap` flag.' : ''
214+
`⚠️ Uploaded ${numAssetsUploaded} of ${totalAssets} bundles and sourcemaps. ${numAssetsUploaded === 0 ? 'Ensure you are running `expo export` with the `--dump-sourcemap` flag.' : ''
215215
}`,
216216
);
217217
}

0 commit comments

Comments
 (0)