0ad/build/build_version/build_version.bat
Itms 9f023825e0
Export a 10-char commit hash in the build version
This avoids collisions in the user report, fixes #7174.
Update the user report version to account for the new build version
format, fixes #7173.

The build version displayed in the GUI is kept at 5 characters for
main menu clutter concerns.
2025-01-07 13:51:45 +01:00

6 lines
328 B
Batchfile

@ECHO OFF
REM Generate a Unicode string constant from git's output, including branch
REM name and an abbreviated commit hash, and write it to build_version.txt
FOR /F %%b IN ('git branch --show-current') DO SET branch=%%b
FOR /F %%h IN ('git rev-parse --short HEAD') DO SET hash=%%h
ECHO L"%branch%, %hash%" > build_version.txt