overleaf/services/web/bin/sentry_upload
Alf Eaton ebebcf5956 Revert "[web] temporarily disable upload of source maps to sentry" (#14386)
GitOrigin-RevId: 8edd758624a72bc5113b8474cc7734faf8a1043c
2023-08-18 12:11:41 +00:00

17 lines
468 B
Bash
Executable file

#!/bin/sh
set -e
if [[ "$BRANCH_NAME" == "master" || "$BRANCH_NAME" == "main" ]]; then
rm -rf sentry_upload
mkdir sentry_upload
tar --directory sentry_upload -xf build.tar
cd sentry_upload/public
SENTRY_RELEASE=${COMMIT_SHA}
OPTS="--no-rewrite --url-prefix ~"
sentry-cli releases new "$SENTRY_RELEASE"
sentry-cli releases files "$SENTRY_RELEASE" upload-sourcemaps ${OPTS} .
sentry-cli releases finalize "$SENTRY_RELEASE"
rm -rf sentry_upload
fi