From ae852f15eaf46d9aa14175d174ebd610cc37ceda Mon Sep 17 00:00:00 2001 From: Adam Moussa Date: Fri, 18 Sep 2026 16:27:25 -0400 Subject: [PATCH] fix(cd): skip source-map upload when sentry-cli is absent August SPA trees have no @sentry/cli. Skipping that step lets a workflow_dispatch of the live staging SHA finish the S3 sync. --- scripts/upload-sourcemaps.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/upload-sourcemaps.sh b/scripts/upload-sourcemaps.sh index d790e674..e1fb8916 100755 --- a/scripts/upload-sourcemaps.sh +++ b/scripts/upload-sourcemaps.sh @@ -14,6 +14,11 @@ fi COMMIT_SHA="$(printf '%s' "${COMMIT_SHA}" | tr '[:upper:]' '[:lower:]')" RELEASE="shoc-frontend@${COMMIT_SHA}" +if ! npm exec --no -- sentry-cli --version >/dev/null 2>&1; then + echo "sentry-cli is not in this SPA tree; skipping source-map upload" + exit 0 +fi + npm exec --no -- sentry-cli sourcemaps upload \ --org "${SENTRY_ORG}" \ --project "${SENTRY_PROJECT}" \