sentry_upload 566 B

12345678910111213141516171819
  1. #!/bin/sh
  2. set -e
  3. if [[ "$BRANCH_NAME" == "master" || "$BRANCH_NAME" == "main" ]]; then
  4. rm -rf sentry_upload
  5. mkdir sentry_upload
  6. tar --directory sentry_upload -xf build.tar
  7. cd sentry_upload/public
  8. SENTRY_RELEASE=${COMMIT_SHA}
  9. sentry-cli releases new "$SENTRY_RELEASE"
  10. sentry-cli releases set-commits --auto "$SENTRY_RELEASE"
  11. sentry-cli files upload --release="$SENTRY_RELEASE" .
  12. sentry-cli sourcemaps inject .
  13. sentry-cli sourcemaps upload --no-rewrite --url-prefix ~ .
  14. sentry-cli releases finalize "$SENTRY_RELEASE"
  15. rm -rf sentry_upload
  16. fi