diff --git a/backend/FwLite/FwLiteDesktop/AppVersion.cs b/backend/FwLite/FwLiteDesktop/AppVersion.cs index 16f9f3421..b6ac0424c 100644 --- a/backend/FwLite/FwLiteDesktop/AppVersion.cs +++ b/backend/FwLite/FwLiteDesktop/AppVersion.cs @@ -4,6 +4,17 @@ namespace FwLiteDesktop; public class AppVersion { - public static readonly string Version = typeof(AppVersion).Assembly - .GetCustomAttribute()?.InformationalVersion ?? "dev"; + static AppVersion() + { + var infoVersion = typeof(AppVersion).Assembly + .GetCustomAttribute()?.InformationalVersion; + //info version may look like v2024-12-12-3073dd1c+3073dd1ce2ff5510f54a9411366f55c958b9ea45. We want to strip off everything after the +, so we can compare versions + if (infoVersion is not null && infoVersion.Contains('+')) + { + infoVersion = infoVersion[..infoVersion.IndexOf('+')]; + } + Version = infoVersion ?? "dev"; + } + + public static readonly string Version; }