mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-09-30 16:13:12 +00:00
Some checks are pending
Dev events bake shoc-frontend@<sha>. Stop tagging artifacts with Terraform version_label so Sentry can symbolicate them.
23 lines
715 B
Bash
Executable file
23 lines
715 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
: "${SENTRY_AUTH_TOKEN:?SENTRY_AUTH_TOKEN is required for source-map upload}"
|
|
|
|
SENTRY_ORG="${SENTRY_ORG:-seahaven}"
|
|
SENTRY_PROJECT="${SENTRY_PROJECT:-shoc-frontend}"
|
|
COMMIT_SHA="${VITE_APP_COMMIT_SHA:-${GITHUB_SHA:-}}"
|
|
|
|
if [[ ! "${COMMIT_SHA}" =~ ^[0-9a-fA-F]{40}$ ]]; then
|
|
echo "::error::Source-map upload requires a 40-character VITE_APP_COMMIT_SHA or GITHUB_SHA." >&2
|
|
exit 1
|
|
fi
|
|
COMMIT_SHA="$(printf '%s' "${COMMIT_SHA}" | tr '[:upper:]' '[:lower:]')"
|
|
RELEASE="shoc-frontend@${COMMIT_SHA}"
|
|
|
|
npm exec --no -- sentry-cli sourcemaps upload \
|
|
--org "${SENTRY_ORG}" \
|
|
--project "${SENTRY_PROJECT}" \
|
|
--release "${RELEASE}" \
|
|
--url-prefix "~/" \
|
|
--validate \
|
|
dist
|