TF-4269 Fix Sentry release version sync across platforms

Use --dart-define=SENTRY_RELEASE=<full-tag> in Fastlane so the app
reports the same version string to Sentry as CI uses when uploading
symbols, bypassing iOS CFBundleShortVersionString stripping.

- Android Fastfile: add --dart-define=SENTRY_RELEASE (build-name unchanged)
- iOS Fastfile: pass DART_DEFINES via xcargs (increment_version_number unchanged)
- Dart: read SENTRY_RELEASE dart-define first, fall back to PackageInfo.version
- NSE/Web unaffected: NSE reads from Keychain, Web falls back to PackageInfo
This commit is contained in:
dab246
2026-04-21 15:15:32 +07:00
parent be7c39018b
commit 99b68d1fc5
4 changed files with 36 additions and 8 deletions
@@ -41,12 +41,15 @@ class SentryConfigLinagoraEcosystem extends LinagoraEcosystemProperties {
extension SentryConfigLinagoraEcosystemExtension on SentryConfigLinagoraEcosystem {
Future<SentryConfig> toSentryConfig() async {
final appVersion = await ApplicationManager().getAppVersion();
const dartDefineRelease = String.fromEnvironment('SENTRY_RELEASE');
final release = dartDefineRelease.isNotEmpty
? dartDefineRelease
: await ApplicationManager().getAppVersion();
return SentryConfig(
dsn: dsn ?? '',
environment: environment ?? '',
release: appVersion,
release: release,
isAvailable: enabled ?? false,
);
}