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

how can i define SENTRY_RELEASE custom #135

Closed
philos3 opened this issue Jul 17, 2023 · 4 comments
Closed

how can i define SENTRY_RELEASE custom #135

philos3 opened this issue Jul 17, 2023 · 4 comments

Comments

@philos3
Copy link

philos3 commented Jul 17, 2023

release use name@version from pubspec (string) as default value, but how can i define SENTRY_RELEASE custom , such as testflight@6.9.2+692 for ios app building, or googlplay@6.9.2+692 for android app building, or some channel as official@6.9.2+692

as i know ,i can edict yaml manually when building APP for each channel. but I want to know is there any more convenient way to do this

version: 6.9.2+692
SENTRY_RELEASE_IOS: testflight@6.9.2+692
SENTRY_RELEASE_IOS2: appstore@6.9.2+692
SENTRY_RELEASE: googlplay@6.9.2+692
SENTRY_RELEASE: official@6.9.2+692

@philos3
Copy link
Author

philos3 commented Jul 17, 2023

It is convenient to define in code,but using sentry-dart-plugin how can i do this in yaml

options.release =
'${DataUtils.getMarketString()}@${Application.instance.appVersion}+${Application.instance.appBuildNum}';

@marandaneto
Copy link
Contributor

You probably need this #81
So you can call the plugin and pass the values as parameters
eg dart run sentry_dart_plugin --dart-define=release=testflight@6.9.2+692 but we've not implemented this yet.
Your option is editing the YAML directly or setting the env. var. as an alternative.

You can also do if conditions and set the options.release dynamically depending on if its Android, or iOS.
Closing this in favor of #81

@eb-so
Copy link

eb-so commented Feb 29, 2024

Your option is editing the YAML directly or setting the env. var. as an alternative.

@marandaneto In my codemagic pipeline I'm increasing the build number automatically so I need the value of the release to match, Do the above solutions work in my case, if so please explain a bit about how to achieve them

@marandaneto
Copy link
Contributor

@eb-so I'm no longer part of the Sentry staff. cc @buenaflor

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

No branches or pull requests

3 participants