OpenJK
OpenJK copied to clipboard
[Shared] Add git tag to version string
replace ~160 lines of cmake with a single call to git 🤷
If the git tag can't be obtained (e.g. no git
on path) it will default to UNKNOWN
So we have:
-
version
cvar (serverinfo) for the engine (also displayed in console) -
gamename
cvar (serverinfo) for the module (also printed on module load)
Future work
Make the command execute at compile time, not just configuration time. Not an issue for official builds, but for local dev the commit hash will stick around until you reconfigure.