From b6127e228eb2bc2b52557bf5353bc8f9090b99e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20D=E2=80=99Aquino?= Date: Wed, 13 May 2026 15:30:37 -0700 Subject: [PATCH] Require SENTRY_AUTH_TOKEN for Sentry dSYM upload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Warn and skip upload when SENTRY_AUTH_TOKEN is not set. Invoke sentry-cli with --auth-token, --org and --project flags and attempt an upload including sources, falling back to a plain dSYM upload on failure. Changelog-None Closes: #3767 Signed-off-by: Daniel D’Aquino --- ci_scripts/ci_post_xcodebuild.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ci_scripts/ci_post_xcodebuild.sh b/ci_scripts/ci_post_xcodebuild.sh index 7b206da1..fcc48a96 100755 --- a/ci_scripts/ci_post_xcodebuild.sh +++ b/ci_scripts/ci_post_xcodebuild.sh @@ -25,12 +25,14 @@ if [ ! -d "${DSYM_PATH}" ]; then exit 0 fi -export SENTRY_ORG=damus-nostr-inc -export SENTRY_PROJECT=apple-ios +if [ -z "${SENTRY_AUTH_TOKEN:-}" ]; then + echo "warning: SENTRY_AUTH_TOKEN is not set, skipping Sentry dSYM upload" + exit 0 +fi -if ! error_output=$(sentry-cli debug-files upload --include-sources "${DSYM_PATH}" 2>&1); then +if ! error_output=$(sentry-cli debug-files upload --auth-token "${SENTRY_AUTH_TOKEN}" --org damus-nostr-inc --project apple-ios --include-sources "${DSYM_PATH}" 2>&1); then echo "warning: sentry-cli failed to upload dSYMs with sources from ${DSYM_PATH}: ${error_output}" - if ! error_output=$(sentry-cli debug-files upload "${DSYM_PATH}" 2>&1); then + if ! error_output=$(sentry-cli debug-files upload --auth-token "${SENTRY_AUTH_TOKEN}" --org damus-nostr-inc --project apple-ios "${DSYM_PATH}" 2>&1); then echo "warning: sentry-cli failed to upload dSYMs from ${DSYM_PATH}: ${error_output}" fi fi