Skip to content

Commit 146e0b4

Browse files
author
Krystof Woldrich
committed
fix(xcode): Avoid silent failure when JS bundle creation fails due to Sentry Xcode scripts
1 parent 10f4742 commit 146e0b4

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
- Use route name instead of route key for current route tracking ([#4650](https://github.com/getsentry/sentry-react-native/pull/4650))
5050
- Using key caused user interaction transaction names to contain route hash in the name.
5151
- Equalize TTID and TTFD duration when TTFD manual API is called and resolved before auto TTID ([#4680](https://github.com/getsentry/sentry-react-native/pull/4680))
52+
- Avoid silent failure when JS bundle was not created due to Sentry Xcode scripts failure ([#4690](https://github.com/getsentry/sentry-react-native/pull/4690))
5253

5354
### Dependencies
5455

packages/core/scripts/sentry-xcode.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ REACT_NATIVE_XCODE=$1
2424
[[ "$AUTO_RELEASE" == false ]] && [[ -z "$BUNDLE_COMMAND" || "$BUNDLE_COMMAND" != "ram-bundle" ]] && NO_AUTO_RELEASE="--no-auto-release"
2525
ARGS="$NO_AUTO_RELEASE $SENTRY_CLI_EXTRA_ARGS $SENTRY_CLI_RN_XCODE_EXTRA_ARGS"
2626

27-
REACT_NATIVE_XCODE_WITH_SENTRY="\"$SENTRY_CLI_EXECUTABLE\" react-native xcode $ARGS \"$REACT_NATIVE_XCODE\""
27+
REACT_NATIVE_XCODE_WITH_SENTRY="\"$SENTRY_CLI_EXECUTABLE\" react-nativeee xcode $ARGS \"$REACT_NATIVE_XCODE\""
28+
29+
exitCode=0
2830

2931
if [ "$SENTRY_DISABLE_AUTO_UPLOAD" != true ]; then
3032
# 'warning:' triggers a warning in Xcode, 'error:' triggers an error
@@ -35,6 +37,7 @@ if [ "$SENTRY_DISABLE_AUTO_UPLOAD" != true ]; then
3537
else
3638
echo "error: sentry-cli - To disable source maps auto upload, set SENTRY_DISABLE_AUTO_UPLOAD=true in your environment variables. Or to allow failing upload, set SENTRY_ALLOW_FAILURE=true"
3739
echo "error: sentry-cli - $SENTRY_XCODE_COMMAND_OUTPUT"
40+
exitCode=1
3841
fi
3942
set -x -e # re-enable
4043
else
@@ -48,3 +51,5 @@ fi
4851
if [ -f "$SENTRY_COLLECT_MODULES" ]; then
4952
/bin/sh "$SENTRY_COLLECT_MODULES"
5053
fi
54+
55+
exit $exitCode

0 commit comments

Comments
 (0)