Skip to content

Commit

Permalink
expo: sentry-expo-upload-sourcemaps no longer requires sentry url (#3915
Browse files Browse the repository at this point in the history
)
  • Loading branch information
lucas-zimerman authored Jun 26, 2024
1 parent 3eb0938 commit 30e2d76
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
20 changes: 10 additions & 10 deletions scripts/expo-upload-sourcemaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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.' : ''
}`,
);
}

0 comments on commit 30e2d76

Please sign in to comment.