2
0
mirror of https://github.com/FWGS/hlsdk-xash3d synced 2024-11-21 17:36:18 +01:00

game_shared: add vcs info implementation, it doesn't necessary require Git info to be present or defined at all

This commit is contained in:
Alibek Omarov 2024-04-05 19:46:49 +03:00 committed by Andrey Akhmichin
parent f2a49073bb
commit b6cbd65766
2 changed files with 20 additions and 0 deletions

13
game_shared/vcs_info.cpp Normal file
View File

@ -0,0 +1,13 @@
#include "vcs_info.h"
#ifdef XASH_BUILD_COMMIT
const char *g_VCSInfo_Commit = XASH_BUILD_COMMIT;
#else
const char *g_VCSInfo_Commit = "unknown-commit";
#endif
#ifdef XASH_BUILD_BRANCH
const char *g_VCSInfo_Branch = XASH_BUILD_BRANCH;
#else
const char *g_VCSInfo_Branch = "unknown-commit";
#endif

7
game_shared/vcs_info.h Normal file
View File

@ -0,0 +1,7 @@
#ifndef VCS_INFO_H
#define VCS_INFO_H
extern const char *g_VCSInfo_Commit;
extern const char *g_VCSInfo_Branch;
#endif // VCS_INFO_H