| 12345678910111213141516171819202122 |
- #!/bin/sh
- set -e
- echo "BRANCH_NAME=$BRANCH_NAME"
- echo "SENTRY_RELEASE=$SENTRY_RELEASE"
- if [[ "$BRANCH_NAME" == "main" ]]; then
- rm -rf sentry_upload
- mkdir sentry_upload
- tar --directory sentry_upload -xf build.tar
- cd sentry_upload/public
- sentry-cli releases new "$SENTRY_RELEASE"
- sentry-cli releases set-commits --auto "$SENTRY_RELEASE"
- sentry-cli sourcemaps upload --release="$SENTRY_RELEASE" .
- sentry-cli releases finalize "$SENTRY_RELEASE"
- cd ../..
- rm -rf sentry_upload
- else
- echo "Not on main branch. Skipping sentry upload."
- fi
|