mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
build: generate a BuildInfo translation unit with version, commit, branch, dirty flag and build kind
cmake/BuildInfo.cmake runs on every build and rewrites the generated BuildInfo.cpp only when something changed, so a new commit recompiles one file and relinks. The build kind comes from DLU_BUILD_KIND (release/ci/local) or CI=true, defaulting to local. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
13
dCommon/BuildInfo.cpp.in
Normal file
13
dCommon/BuildInfo.cpp.in
Normal file
@@ -0,0 +1,13 @@
|
||||
// Generated by cmake/BuildInfo.cmake on every build. Do not edit.
|
||||
#include "BuildInfo.h"
|
||||
|
||||
namespace BuildInfo {
|
||||
const uint8_t versionMajor = @VERSION_MAJOR@;
|
||||
const uint8_t versionMinor = @VERSION_MINOR@;
|
||||
const uint8_t versionPatch = @VERSION_PATCH@;
|
||||
const eBuildKind buildKind = eBuildKind::@BUILD_KIND@;
|
||||
const bool dirty = @BUILD_DIRTY@;
|
||||
const std::string_view commit = "@BUILD_COMMIT@";
|
||||
const std::string_view branch = "@BUILD_BRANCH@";
|
||||
const std::string_view buildString = "@BUILD_STRING@";
|
||||
}
|
||||
Reference in New Issue
Block a user