#Unity - Manually trigger debug uploads with data provided from SDK

2 messages · Page 1 of 1 (latest)

violet bison
#

Hey there.

Currently, we use the SDK's option to automatically upload the debugging symbols after the build completes. However, we'd like to set it up to have this done as a separate step of our build process, that way we can control when it happens (and crucially, if it fails).

I know that I can manually invoke sentry-cli, but I know that the SDK builds its list of files that would need to be uploaded internally and passes this to sentry-cli. Ideally, I would like the SDK to store this list of files (or, alternatively, output the command(s) it would have ran) so that I can invoke the commands myself.

While I could manually look for the debug files myself to upload, I believe it's much more effective and futureproof if I could use the list generated by the SDK.

I don't believe this is possible now, correct? Would this be a feature that would be viable in the future, or is it too niche to matter?

inner skiff
#

Hey,
out of curiosity, why do you want to have it run in a separate step?

That's a tricky one. It's fairly integrated. The SDK put together that list only if the upload is enabled. So it'd require quite a bit of restructuring and a new set of controls and I don't see this happening any time soon.

A workaround that comes to mind would be to have the upload enabled but fail on purpose. I.e. a fake auth token. Also, enable Ignore CLI Errors.
That way the SDK will set it up correctly but fails the upload without breaking the build.

You can then update the sentry.properties files (this is where the auth token ends up) grab the commands from the Gradle Task/Xcode build script and then run it yourself.

But that'd be quite the involved and possibly brittle process to build on.