Skip to content

Commit

Permalink
Remove build suffix from version when reporting to sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed May 11, 2022
1 parent c61d0ff commit 9dce329
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion osu.Game/OsuGameBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ public partial class OsuGameBase : Framework.Game, ICanAcceptFiles

public bool IsDeployedBuild => AssemblyVersion.Major > 0;

internal const string BUILD_SUFFIX = "lazer";

public virtual string Version
{
get
Expand All @@ -94,7 +96,7 @@ public virtual string Version
return @"local " + (DebugUtils.IsDebugBuild ? @"debug" : @"release");

var version = AssemblyVersion;
return $@"{version.Major}.{version.Minor}.{version.Build}-lazer";
return $@"{version.Major}.{version.Minor}.{version.Build}-{BUILD_SUFFIX}";
}
}

Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Utils/SentryLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public SentryLogger(OsuGame game)

options.AutoSessionTracking = true;
options.IsEnvironmentUser = false;
options.Release = game.Version;
options.Release = game.Version.Replace($@"-{OsuGameBase.BUILD_SUFFIX}", string.Empty);
});

Logger.NewEntry += processLogEntry;
Expand Down

0 comments on commit 9dce329

Please sign in to comment.