mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
fix(apple): Use standardized Sentry release name and set dist to package type (#7668)
- Updates the Sentry release name to follow `component@version` format - Uses the Sentry `dist` field to set the distribution type, `appstore|standalone`
This commit is contained in:
@@ -37,6 +37,7 @@ public enum Telemetry {
|
||||
options.dsn = "https://66c71f83675f01abfffa8eb977bcbbf7@o4507971108339712.ingest.us.sentry.io/4508175177023488"
|
||||
options.environment = "entrypoint" // will be reconfigured in TunnelManager
|
||||
options.releaseName = releaseName()
|
||||
options.dist = distributionType()
|
||||
|
||||
#if DEBUG
|
||||
// https://docs.sentry.io/platforms/apple/guides/ios/configuration/options/#debug
|
||||
@@ -87,19 +88,23 @@ public enum Telemetry {
|
||||
}
|
||||
}
|
||||
|
||||
private static func distributionType() -> String {
|
||||
// Apps from the app store have a receipt file
|
||||
if BundleHelper.isAppStore() {
|
||||
return "appstore"
|
||||
}
|
||||
|
||||
return "standalone"
|
||||
}
|
||||
|
||||
private static func releaseName() -> String {
|
||||
let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"]
|
||||
as? String ?? "unknown"
|
||||
|
||||
#if os(iOS)
|
||||
return "ios-appstore-\(version)"
|
||||
return "ios-client@\(version)"
|
||||
#else
|
||||
// Apps from the app store have a receipt file
|
||||
if BundleHelper.isAppStore() {
|
||||
return "macos-appstore-\(version)"
|
||||
}
|
||||
|
||||
return "macos-client-\(version)"
|
||||
return "macos-client@\(version)"
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user