using System.Reflection; namespace Flypaper.Web; public static class AppVersion { public static string Current { get; } = Read(); private static string Read() { var version = typeof(AppVersion).Assembly.GetCustomAttribute()?.InformationalVersion ?? "0.0.0-dev"; var plus = version.IndexOf('+'); return plus >= 0 && version.Length > plus + 8 ? version[..(plus + 8)] : version; } }