From c365469ddb849269e5edf30359511a068bcb9c6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kry=C5=A1tof=20Wold=C5=99ich?= <31292499+krystofwoldrich@users.noreply.github.com> Date: Mon, 22 Jan 2024 13:43:24 -0500 Subject: [PATCH] fix: Auto add release and dist to every artifact upload (#3540) --- CHANGELOG.md | 1 + scripts/sentry-xcode.sh | 2 +- sentry.gradle | 7 +++---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6adf06578..0170f3b6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ - Sentry CLI 2.25.1 fixes background debug files uploads during Xcode builds ([#3486](https://github.com/getsentry/sentry-react-native/pull/3486)) - Performance Tracing should be disabled by default ([#3533](https://github.com/getsentry/sentry-react-native/pull/3533)) - Use `$NODE_BINARY` to execute Sentry CLI in Xcode scripts ([#3493](https://github.com/getsentry/sentry-react-native/pull/3493)) +- Return auto Release and Dist to source maps auto upload ([#3540](https://github.com/getsentry/sentry-react-native/pull/3540)) ### Dependencies diff --git a/scripts/sentry-xcode.sh b/scripts/sentry-xcode.sh index b127326ec..3752345c3 100755 --- a/scripts/sentry-xcode.sh +++ b/scripts/sentry-xcode.sh @@ -17,7 +17,7 @@ LOCAL_NODE_BINARY=${NODE_BINARY:-node} REACT_NATIVE_XCODE=$1 -[[ "$AUTO_RELEASE" != true ]] && [[ -z "$BUNDLE_COMMAND" || "$BUNDLE_COMMAND" != "ram-bundle" ]] && NO_AUTO_RELEASE="--no-auto-release" +[[ "$AUTO_RELEASE" == false ]] && [[ -z "$BUNDLE_COMMAND" || "$BUNDLE_COMMAND" != "ram-bundle" ]] && NO_AUTO_RELEASE="--no-auto-release" ARGS="$NO_AUTO_RELEASE $SENTRY_CLI_EXTRA_ARGS $SENTRY_CLI_RN_XCODE_EXTRA_ARGS" REACT_NATIVE_XCODE_WITH_SENTRY="\"$SENTRY_CLI_EXECUTABLE\" react-native xcode $ARGS \"$REACT_NATIVE_XCODE\"" diff --git a/sentry.gradle b/sentry.gradle index 4320e3b9a..a3cf930e8 100644 --- a/sentry.gradle +++ b/sentry.gradle @@ -130,10 +130,9 @@ gradle.projectsEvaluated { def process = ["node", hasSourceMapDebugIdScript, sourcemapOutput].execute(null, new File("$reactRoot")) def exitValue = process.waitFor() project.logger.lifecycle("Check generated source map for Debug ID: ${process.text}") - def notIncludeRelease = "$bundleCommand" == "bundle" && exitValue == 0 - def not = notIncludeRelease ? 'not ' : '' - project.logger.lifecycle("Sentry Source Maps upload will ${not}include the release name and dist.") - extraArgs.addAll(notIncludeRelease ? [] : [ + + project.logger.lifecycle("Sentry Source Maps upload will include the release name and dist.") + extraArgs.addAll([ "--release", releaseName, "--dist", versionCode ])