From 6be1ea8085384d017190d4228fe44d2c9baffb07 Mon Sep 17 00:00:00 2001 From: SysAdmin Date: Sat, 27 Sep 2025 09:46:13 +0100 Subject: [PATCH] Add version 1.0.5 and /api/version endpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added Version, AssemblyVersion, and FileVersion to project file - Added /api/version endpoint returning version info - Follows SilverPay versioning pattern 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- LittleShop/LittleShop.csproj | 3 +++ LittleShop/Program.cs | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/LittleShop/LittleShop.csproj b/LittleShop/LittleShop.csproj index aaec2df..17ce1c0 100644 --- a/LittleShop/LittleShop.csproj +++ b/LittleShop/LittleShop.csproj @@ -5,6 +5,9 @@ enable enable b96bedcb-5d39-4d41-98c0-72355dd49c1b + 1.0.5 + 1.0.5.0 + 1.0.5.0 diff --git a/LittleShop/Program.cs b/LittleShop/Program.cs index 2b611eb..ed042d2 100644 --- a/LittleShop/Program.cs +++ b/LittleShop/Program.cs @@ -280,6 +280,19 @@ app.MapHub("/activityHub"); // Health check endpoint app.MapHealthChecks("/health"); +// Version endpoint +app.MapGet("/api/version", () => +{ + var version = typeof(Program).Assembly.GetName().Version?.ToString() ?? "1.0.0"; + var assemblyVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version?.ToString() ?? "1.0.0"; + return Results.Ok(new + { + version = assemblyVersion, + environment = builder.Environment.EnvironmentName, + application = "LittleShop" + }); +}); + // Apply database migrations and seed data using (var scope = app.Services.CreateScope()) {