Files
Flypaper/src/Flypaper.Web/AppVersion.cs
T
TomandClaude Opus 5.5 7c3657d015
Build and deploy / build (push) Successful in 1m56s
Build and deploy / deploy (push) Successful in 22s
Add versioning, release workflow and changelog
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 17:25:11 +01:00

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;
}
}