feat: log the build identifier at startup and show it on the dashboard About page

Every server logs BuildInfo's build string as its version; the About page
also shows the build kind and commit, and log bundles name the build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-29 16:28:40 -05:00
parent 05d18f56e4
commit 744bee40df
10 changed files with 27 additions and 6 deletions

View File

@@ -23,6 +23,7 @@
#include "GameLabels.h"
#include "BehaviorXml.h"
#include "ClientAssets.h"
#include "BuildInfo.h"
#include <chrono>
#include <algorithm>
#include <fstream>
@@ -484,7 +485,8 @@ void RegisterDashboardRoutes() {
SimplePage("/settings", Perm("settings"), "settings.jinja2", "settings", "Server settings");
SimplePage("/client_assets", Perm("client_files"), "client_assets.jinja2", "client_assets", "Browse the game client's files");
Route(eHTTPMethod::GET, "/about", 0, "About this server", [](HTTPReply& reply, const HTTPContext& context) {
RenderPage(reply, context, "about.jinja2", "about", { {"version", PROJECT_VERSION} });
RenderPage(reply, context, "about.jinja2", "about", { {"version", std::string(BuildInfo::buildString)},
{"commit", std::string(BuildInfo::commit)}, {"dirty", BuildInfo::dirty}, {"buildKind", std::string(BuildInfo::BuildKindName())} });
});
// Logs