fix: Remove setRelease and setDist, have auto release passed to native #213
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In previous versions, we had
setRelease
andsetDist
which set__sentry_release
and__sentry_dist
as an extra, we remove these methods in favor of passingrelease
anddist
to init. This removes the existing code on the iOS native bridge that handles this, and we did not add support for this on the Android bridge.We also have the
SENTRY_RELEASE
environment variable that is built by the script at build time and matches the sourcemaps set the release on init instead of setting it in a JS event processor. This way we have the auto release set on native events as well.Closes #196 (Instead of deprecating, we should remove entirely given that this is a major bump anyways)
Testing
Added tests to test that
SENTRY_RELEASE
is passed asrelease
when initing the SDK, and that a user-setrelease
takes precedent over the default auto release.Tested on sample app on iOS and Android.