Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
version.h
Go to the documentation of this file.
1#pragma once
2
3// Source/System/version.h — Olympe Engine Version Stamp System
4// Embeds build metadata into the executable for complete traceability.
5// Update all fields after each PR merge:
6// - BUILD_TIMESTAMP : UTC ISO 8601 (YYYY-MM-DD HH:MM:SS UTC)
7// - GIT_COMMIT_SHA : full 40-character commit hash
8// - GIT_BRANCH : branch name (usually "master")
9// - PR_NUMBER : merged PR reference (e.g. "#388")
10// - PHASE : XX-Y format with feature name
11// - MAJOR/MINOR/PATCH : semantic version
12// - BUILD_CONFIG : "Debug" or "Release"
13// - FULL_VERSION_STRING : must remain one continuous line (binary searchable)
14// C++14 compliant. Only dependency: system_utils.h for SYSTEM_LOG.
15
16#include "../system/system_utils.h"
17
18namespace Olympe
19{
21 {
22 // Semantic versioning
23 static constexpr const char* MAJOR = "0";
24 static constexpr const char* MINOR = "24";
25 static constexpr const char* PATCH = "0";
26
27 // Build metadata — update after each PR merge
28 static constexpr const char* BUILD_TIMESTAMP = "2026-03-18 20:31:22 UTC";
29 static constexpr const char* GIT_COMMIT_SHA = "fecadedf207d35b70037277f646a03f43f5b6d1c";
30 static constexpr const char* GIT_BRANCH = "copilot/fix-compilation-failure-syntax";
31 static constexpr const char* PR_NUMBER = "#450";
32 static constexpr const char* PHASE = "24-Rendering-HOTFIX";
33 static constexpr const char* BUILD_CONFIG = "Debug";
34
35 // Single continuous line — binary searchable with: strings <exe> | grep OLYMPE_VERSION
36 static constexpr const char* FULL_VERSION_STRING =
37 "OLYMPE_VERSION:0.24.0|BUILD:2026-03-18 20:31:22 UTC"
38 "|SHA:fecadedf207d35b70037277f646a03f43f5b6d1c"
39 "|BRANCH:copilot/fix-compilation-failure-syntax"
40 "|PR:#450|PHASE:24-Rendering-HOTFIX|CONFIG:Debug";
41
42 // Log all version fields via SYSTEM_LOG.
43 // Call this as the very first operation in main() before any other logs.
44 static void PrintVersionInfo()
45 {
46 SYSTEM_LOG << "[VersionStamp] Olympe Engine v"
47 << MAJOR << "." << MINOR << "." << PATCH << std::endl;
48 SYSTEM_LOG << "[VersionStamp] Build timestamp : " << BUILD_TIMESTAMP << std::endl;
49 SYSTEM_LOG << "[VersionStamp] Git commit SHA : " << GIT_COMMIT_SHA << std::endl;
50 SYSTEM_LOG << "[VersionStamp] Git branch : " << GIT_BRANCH << std::endl;
51 SYSTEM_LOG << "[VersionStamp] PR reference : " << PR_NUMBER << std::endl;
52 SYSTEM_LOG << "[VersionStamp] Phase : " << PHASE << std::endl;
53 SYSTEM_LOG << "[VersionStamp] Build config : " << BUILD_CONFIG << std::endl;
54 SYSTEM_LOG << "[VersionStamp] Full version : " << FULL_VERSION_STRING << std::endl;
55 }
56 };
57
58} // namespace Olympe
< Provides AssetID and INVALID_ASSET_ID
static constexpr const char * BUILD_CONFIG
Definition version.h:33
static constexpr const char * PATCH
Definition version.h:25
static constexpr const char * MINOR
Definition version.h:24
static constexpr const char * GIT_COMMIT_SHA
Definition version.h:29
static constexpr const char * BUILD_TIMESTAMP
Definition version.h:28
static constexpr const char * PR_NUMBER
Definition version.h:31
static constexpr const char * GIT_BRANCH
Definition version.h:30
static constexpr const char * MAJOR
Definition version.h:23
static constexpr const char * PHASE
Definition version.h:32
static void PrintVersionInfo()
Definition version.h:44
static constexpr const char * FULL_VERSION_STRING
Definition version.h:36
#define SYSTEM_LOG