16 lines
462 B
C#
16 lines
462 B
C#
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<AssemblyInformationalVersionAttribute>()?.InformationalVersion ?? "0.0.0-dev";
|
|
var plus = version.IndexOf('+');
|
|
return plus >= 0 && version.Length > plus + 8 ? version[..(plus + 8)] : version;
|
|
}
|
|
}
|