diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e814dd6ff..3a4e6ced29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - 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)) +### Fixes + +- `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)) + ### Dependencies - Bump Cocoa SDK from v8.29.1 to v8.30.0 ([#3914](https://github.com/getsentry/sentry-react-native/pull/3914)) diff --git a/scripts/expo-upload-sourcemaps.js b/scripts/expo-upload-sourcemaps.js index 0e7b4b37a4..0f244f2ac1 100755 --- a/scripts/expo-upload-sourcemaps.js +++ b/scripts/expo-upload-sourcemaps.js @@ -149,16 +149,17 @@ if (!sentryOrg || !sentryProject || !sentryUrl) { console.log(`${SENTRY_PROJECT} resolved to ${sentryProject} from expo config.`); } if (!sentryUrl) { - if (!pluginConfig.url) { - console.error( - `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.`, + if (pluginConfig.url) { + sentryUrl = pluginConfig.url; + console.log(`${SENTRY_URL} resolved to ${sentryUrl} from expo config.`); + } + else { + sentryUrl = `https://sentry.io/`; + console.log( + `Since it wasn't specified in the Expo config or environment variable, ${SENTRY_URL} now points to ${sentryUrl}.` ); - process.exit(1); } - - sentryUrl = pluginConfig.url; - console.log(`${SENTRY_URL} resolved to ${sentryUrl} from expo config.`); - } + } } if (!authToken) { @@ -210,8 +211,7 @@ if (numAssetsUploaded === totalAssets) { console.log('✅ Uploaded bundles and sourcemaps to Sentry successfully.'); } else { console.warn( - `⚠️ Uploaded ${numAssetsUploaded} of ${totalAssets} bundles and sourcemaps. ${ - numAssetsUploaded === 0 ? 'Ensure you are running `expo export` with the `--dump-sourcemap` flag.' : '' + `⚠️ Uploaded ${numAssetsUploaded} of ${totalAssets} bundles and sourcemaps. ${numAssetsUploaded === 0 ? 'Ensure you are running `expo export` with the `--dump-sourcemap` flag.' : '' }`, ); }