diff --git a/.gitea/workflows/prepare-release.yml b/.gitea/workflows/prepare-release.yml index befd7830..22d32130 100644 --- a/.gitea/workflows/prepare-release.yml +++ b/.gitea/workflows/prepare-release.yml @@ -102,6 +102,7 @@ jobs: - name: Write Production Config run: | mkdir -p ./publish + VERSION="${{ steps.metadata.outputs.version }}" python3 -c ' import json import pathlib @@ -117,7 +118,8 @@ jobs: "LogLevel": { "Default": "Information" } - } + }, + "AppVersion": "'$VERSION'" } pathlib.Path("./publish/appsettings.Production.json").write_text( @@ -126,7 +128,7 @@ jobs: )' test -s ./publish/appsettings.Production.json || { echo "ERROR: appsettings.Production.json is empty"; exit 1; } - echo "✓ Production config created (no secrets included)" + echo "✓ Production config created (version: $VERSION)" - name: Package Artifact run: | diff --git a/src/dotnet/QuantEngine.Web/Pages/Admin/_AdminLayout.cshtml b/src/dotnet/QuantEngine.Web/Pages/Admin/_AdminLayout.cshtml index 23ca2bdd..e8d4d3d6 100644 --- a/src/dotnet/QuantEngine.Web/Pages/Admin/_AdminLayout.cshtml +++ b/src/dotnet/QuantEngine.Web/Pages/Admin/_AdminLayout.cshtml @@ -1,8 +1,12 @@ +@using Microsoft.Extensions.Configuration +@inject IConfiguration Configuration + @{ Layout = null; var currentPath = Context.Request.Path.Value?.ToLowerInvariant() ?? ""; string NavActive(string href) => currentPath.StartsWith(href.ToLowerInvariant()) ? "active" : ""; + var version = Configuration["AppVersion"] ?? "dev"; } @@ -65,7 +69,7 @@ F7엑셀