Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expo: sentry-expo-upload-sourcemaps no longer requires sentry url #3915

Merged
merged 4 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.' : ''
}`,
);
}
Loading