fix: hide sentry instrumentation on debug builds (#604)

* fix: hide sentry instrumentation on debug builds

* fix: amend documentation to reference zip:to-public rather than zip
This commit is contained in:
Razboy20
2025-05-27 23:35:11 -05:00
committed by GitHub
parent 29d20d5c5a
commit 454e5e807a
3 changed files with 13 additions and 9 deletions

View File

@@ -35,9 +35,13 @@ function removeExtraDatabaseDir(cb) {
// Instrument with Sentry
// Make sure sentry is configured https://docs.sentry.io/platforms/javascript/sourcemaps/uploading/typescript/#2-configure-sentry-cli
async function instrumentWithSentry(cb) {
await exec(`sentry-cli sourcemaps inject ${DIST_DIR}`);
await exec(`sentry-cli sourcemaps upload ${DIST_DIR}`);
log('Sentry instrumentation completed.');
if (process.env.SENTRY_ENV && process.env.SENTRY_ENV !== 'development') {
await exec(`sentry-cli sourcemaps inject ${DIST_DIR}`);
await exec(`sentry-cli sourcemaps upload ${DIST_DIR}`);
log('Sentry instrumentation completed.');
} else {
logWarn('Skipping uploading/creating Sentry source maps. (development build)');
}
cb();
}