overleaf/services/web/bin/sentry_upload
Alf Eaton 8993f877d4 Merge pull request #4061 from overleaf/ae-sentrycli-token
Use org token for sentry-cli authentication

GitOrigin-RevId: 6c121e83044f3c178403984313c15c74a58f5c7a
2021-05-19 02:06:22 +00:00

18 lines
499 B
Bash
Executable file

#!/bin/sh
set -e
if [[ "$BRANCH_NAME" == "master" ]]; 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 set-commits --auto "$SENTRY_RELEASE"
sentry-cli releases finalize "$SENTRY_RELEASE"
rm -rf sentry_upload
fi