Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload debug symbols fails on iOS in monorepo. #3490

Closed
joarkosberg opened this issue Dec 28, 2023 · 3 comments · Fixed by #3525
Closed

Upload debug symbols fails on iOS in monorepo. #3490

joarkosberg opened this issue Dec 28, 2023 · 3 comments · Fixed by #3525

Comments

@joarkosberg
Copy link
Contributor

The script sentry-xcode-debug-files.sh does not enable overriding the WITH_ENVIRONMENT variable. So in a monorepo, it does not find the with environment script.
All other environment variables I have needed to change are configurable. So would be nice if this one was too.

Looked into creating PR, with looking it up as a environment variable, but unsure if that is the preferable way.

@krystofwoldrich
Copy link
Member

Hi, thank you for the message,

we would be happy to review your PR, definitely preferred.

I think the fix could look like this, if WITH_ENVIRONMENT is defined use it otherwise they node resolution to locate the react-native package:

[ -z "$WITH_ENVIRONMENT" ] && REACT_NATIVE_PACKAGE_PATH=$("$LOCAL_NODE_BINARY" --print "require('path').dirname(require.resolve('react-native/package.json'))")
[ -z "$WITH_ENVIRONMENT" ] && WITH_ENVIRONMENT="${SENTRY_CLI_PACKAGE_PATH}/scripts/xcode/with-environment.sh"
if [ -f "$WITH_ENVIRONMENT" ]; then
    . "$WITH_ENVIRONMENT"
fi

@joarkosberg
Copy link
Contributor Author

Hi, thank you for the message,

we would be happy to review your PR, definitely preferred.

I think the fix could look like this, if WITH_ENVIRONMENT is defined use it otherwise they node resolution to locate the react-native package:

[ -z "$WITH_ENVIRONMENT" ] && REACT_NATIVE_PACKAGE_PATH=$("$LOCAL_NODE_BINARY" --print "require('path').dirname(require.resolve('react-native/package.json'))")
[ -z "$WITH_ENVIRONMENT" ] && WITH_ENVIRONMENT="${SENTRY_CLI_PACKAGE_PATH}/scripts/xcode/with-environment.sh"
if [ -f "$WITH_ENVIRONMENT" ]; then
    . "$WITH_ENVIRONMENT"
fi

Tested a version of your suggestion locally and created a PR here #3496 😊

@krystofwoldrich
Copy link
Member

Thank you, we will review the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants