Skip to content

Commit 5e374c1

Browse files
authored
fix: include dist environment and hide sentry verbose output (#11530)
1 parent b4f17fa commit 5e374c1

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

scripts/upload-sourcemaps.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ set -e
44
if [ -z "$SENTRY_PROJECT" ]; then
55
echo "SENTRY_PROJECT environment variable is not set. Ignoring..."
66
exit 0
7+
elif [ -z "$SENTRY_AUTH_TOKEN" ]; then
8+
echo "SENTRY_AUTH_TOKEN environment variable is not set. Ignoring..."
9+
exit 0
710
fi
811

912
if ! [ -z "$SOURCE_VERSION" ]; then
@@ -22,7 +25,9 @@ if [ -z "$HEROKU_SLUG_COMMIT" ]; then
2225
fi
2326

2427
echo "Injecting source maps for release $RELEASE..."
25-
sentry-cli sourcemaps inject --org $SENTRY_ORG --project $SENTRY_PROJECT ./dist
28+
sentry-cli sourcemaps inject --org $SENTRY_ORG --project $SENTRY_PROJECT ./dist >/dev/null
29+
echo "Done."
2630

27-
echo "Uploading source maps for release $RELEASE..."
28-
sentry-cli sourcemaps upload --org $SENTRY_ORG --project $SENTRY_PROJECT --release=$RELEASE ./dist
31+
echo "Uploading source maps for release $RELEASE and dist $OC_ENV..."
32+
sentry-cli sourcemaps upload --org $SENTRY_ORG --project $SENTRY_PROJECT --release=$RELEASE --dist=$OC_ENV ./dist >/dev/null
33+
echo "Done."

server/lib/sentry/init.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Sentry.init({
8484
// Relative to tracesSampler
8585
profilesSampleRate: PROFILES_SAMPLE_RATE,
8686
release: process.env.HEROKU_SLUG_COMMIT,
87+
dist: config.env,
8788
});
8889

8990
export default Sentry;

0 commit comments

Comments
 (0)