overleaf/services/web/bin/sentry_upload
Jakob Ackermann 48b138f227 Merge pull request #2929 from overleaf/jpa-ci-3m30s-with-custom-cloudbuild
[misc] another batch of CI improvements

GitOrigin-RevId: 470fd762ba541d5dce92f0e99830fb2fd8fc4747
2020-07-03 02:04:13 +00:00

17 lines
440 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 finalize "$SENTRY_RELEASE"
rm -rf sentry_upload
fi