Skip to content

Commit 8900e1a

Browse files
fix(xcode): Upload debug-files needs a path to read from (#2913)
1 parent d0764c8 commit 8900e1a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

sample-new-architecture/ios/sampleNewArchitecture.xcodeproj/project.pbxproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@
258258
/* Begin PBXShellScriptBuildPhase section */
259259
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
260260
isa = PBXShellScriptBuildPhase;
261+
alwaysOutOfDate = 1;
261262
buildActionMask = 2147483647;
262263
files = (
263264
);
@@ -270,7 +271,7 @@
270271
);
271272
runOnlyForDeploymentPostprocessing = 0;
272273
shellPath = /bin/sh;
273-
shellScript = "export SENTRY_PROPERTIES=sentry.properties\nexport EXTRA_PACKAGER_ARGS=\"--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map\"\nset -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT \\\"../../node_modules/@sentry/cli/bin/sentry-cli react-native xcode $REACT_NATIVE_XCODE\\\"\"\n\nexport MODULES_PATHS=\"$PWD/../node_modules,$PWD/../../..\"\n/bin/sh ../../scripts/collect-modules.sh\n";
274+
shellScript = "export SENTRY_PROPERTIES=sentry.properties\nexport EXTRA_PACKAGER_ARGS=\"--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map\"\nset -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\nSENTRY_CLI=\"../../node_modules/@sentry/cli/bin/sentry-cli\"\n\nCOMMAND=\"$SENTRY_CLI react-native xcode --force-foreground $REACT_NATIVE_XCODE\"\n/bin/sh -c \"$WITH_ENVIRONMENT \\\"$COMMAND\\\"\"\n\nexport MODULES_PATHS=\"$PWD/../node_modules,$PWD/../../..\"\n/bin/sh ../../scripts/collect-modules.sh\n";
274275
};
275276
00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = {
276277
isa = PBXShellScriptBuildPhase;
@@ -291,6 +292,7 @@
291292
};
292293
8152B8B60F6641B996EA3E8F /* Upload Debug Symbols to Sentry */ = {
293294
isa = PBXShellScriptBuildPhase;
295+
alwaysOutOfDate = 1;
294296
buildActionMask = 2147483647;
295297
files = (
296298
);
@@ -301,7 +303,7 @@
301303
);
302304
runOnlyForDeploymentPostprocessing = 0;
303305
shellPath = /bin/sh;
304-
shellScript = "\nexport SENTRY_PROPERTIES=sentry.properties\n[[ $SENTRY_INCLUDE_NATIVE_SOURCES == \"true\" ]] && INCLUDE_SOURCES_FLAG=\"--include-sources\" || INCLUDE_SOURCES_FLAG=\"\"\n../../node_modules/@sentry/cli/bin/sentry-cli debug-files upload \"$INCLUDE_SOURCES_FLAG\"\n";
306+
shellScript = "\nexport SENTRY_PROPERTIES=sentry.properties\n[[ $SENTRY_INCLUDE_NATIVE_SOURCES == \"true\" ]] && INCLUDE_SOURCES_FLAG=\"--include-sources\" || INCLUDE_SOURCES_FLAG=\"\"\n\nSENTRY_CLI=\"../../node_modules/@sentry/cli/bin/sentry-cli\"\nFLAGS=\"--force-foreground $INCLUDE_SOURCES_FLAG\"\n\"$SENTRY_CLI\" debug-files upload $FLAGS $DWARF_DSYM_FOLDER_PATH\n\n\n\n";
305307
};
306308
A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = {
307309
isa = PBXShellScriptBuildPhase;

test/react-native/rn.patch.xcode.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ let bundleScriptRegex;
2626
let bundlePatchRegex;
2727
const symbolsScript = `
2828
export SENTRY_PROPERTIES=sentry.properties
29-
../node_modules/@sentry/cli/bin/sentry-cli upload-dsym
29+
../node_modules/@sentry/cli/bin/sentry-cli debug-files upload --force-foreground "$DWARF_DSYM_FOLDER_PATH"
3030
`;
3131
const symbolsPatchRegex = /sentry-cli\s+(upload-dsym|debug-files upload)/;
3232
if (semver.satisfies(args['rn-version'], `< ${newBundleScriptRNVersion}`)) {
@@ -37,7 +37,7 @@ export EXTRA_PACKAGER_ARGS="--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.m
3737
set -e
3838
3939
export NODE_BINARY=node
40-
../node_modules/@sentry/cli/bin/sentry-cli react-native xcode ../node_modules/react-native/scripts/react-native-xcode.sh
40+
../node_modules/@sentry/cli/bin/sentry-cli react-native xcode --force-foreground ../node_modules/react-native/scripts/react-native-xcode.sh
4141
4242
/bin/sh ../node_modules/@sentry/react-native/scripts/collect-modules.sh
4343
`;

0 commit comments

Comments
 (0)