Skip to content

Commit

Permalink
Merge pull request ppy#18216 from peppy/sentry-build-suffix
Browse files Browse the repository at this point in the history
Remove build suffix from version when reporting to sentry
  • Loading branch information
peppy authored May 11, 2022
2 parents c61d0ff + 533f4b2 commit 396be1b
Show file tree
Hide file tree
Showing 2 changed files with 6 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
4 changes: 3 additions & 1 deletion osu.Game/Utils/SentryLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ public SentryLogger(OsuGame game)

options.AutoSessionTracking = true;
options.IsEnvironmentUser = false;
options.Release = game.Version;
// The reported release needs to match release tags on github in order for sentry
// to automatically associate and track against releases.
options.Release = game.Version.Replace($@"-{OsuGameBase.BUILD_SUFFIX}", string.Empty);
});

Logger.NewEntry += processLogEntry;
Expand Down

0 comments on commit 396be1b

Please sign in to comment.