From 4ac8ca9085bf0b3ccf71ebcfc7d4dd022d89da33 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Thu, 7 Oct 2021 12:30:25 +1100 Subject: [PATCH] fix(ios): move sentry settings responsibility to build agent The build agent already has the relevant `SENTRY_` environment variables set in order to complete builds for all projects. Thus, we should exclude these values from the xcode build. However, we need to ensure that the `SENTRY_URL` and `SENTRY_ORG` variables are imported into the xcode environment from the build agent environment. --- resources/build/build-utils.sh | 2 ++ resources/build/xcode-utils.sh | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/build/build-utils.sh b/resources/build/build-utils.sh index aca68ee6ce..fc9e433817 100755 --- a/resources/build/build-utils.sh +++ b/resources/build/build-utils.sh @@ -198,6 +198,8 @@ function exportEnvironmentDefinitionScript() { echo "# Required for successful dSYM upload for Sentry error reporting" >> "$ENVIRONMENT_SH" echo "export SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN:-}" >> "$ENVIRONMENT_SH" + echo "export SENTRY_URL=${SENTRY_URL:-}" >> "$ENVIRONMENT_SH" + echo "export SENTRY_ORG=${SENTRY_ORG:-}" >> "$ENVIRONMENT_SH" # Ensure the autogenerated file may be successfully run/included by xcode-utils.sh. chmod +x "$ENVIRONMENT_SH" diff --git a/resources/build/xcode-utils.sh b/resources/build/xcode-utils.sh index 08335f6304..a360d07fa8 100755 --- a/resources/build/xcode-utils.sh +++ b/resources/build/xcode-utils.sh @@ -129,8 +129,6 @@ function phaseSentryDsymUpload() { # The remaining update logic seen here was auto-generated at https://sentry.keyman.com/keyman/keyman-ios/getting-started/cocoa-swift/ if which sentry-cli >/dev/null; then - export SENTRY_URL="https://sentry.keyman.com" - export SENTRY_ORG=keyman export SENTRY_PROJECT="$SENTRY_PROJECT_TARGET" export SENTRY_LOG_LEVEL=info ERROR=$(sentry-cli upload-dif "$DWARF_DSYM_FOLDER_PATH" 2>&1 >/dev/null)