overleaf/services/web/bin/sentry_upload
nate stemen 397a3d97df Merge pull request #4374 from overleaf/jpa-support-main-branch
[misc] add support for main branch

GitOrigin-RevId: 0720706674db329d7f1ddb8e829da076b86c75f8
2021-08-04 02:05:45 +00:00

18 lines
527 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 set-commits --auto "$SENTRY_RELEASE"
sentry-cli releases finalize "$SENTRY_RELEASE"
rm -rf sentry_upload
fi