From c5d198e3e9f0b2d9a09df45f58dabc6c14c79dae Mon Sep 17 00:00:00 2001 From: Nikita Smith Date: Wed, 30 Oct 2024 15:16:34 -0700 Subject: [PATCH] build linker with branch name and full commit hash --- build.bat | 4 +++- src/linker/lnk.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build.bat b/build.bat index 55d05d0d..3bbde071 100644 --- a/build.bat +++ b/build.bat @@ -87,7 +87,9 @@ pushd build popd :: --- Get Current Git Commit Id ---------------------------------------------- -for /f %%i in ('call git describe --always --dirty') do set compile=%compile% -DBUILD_GIT_HASH=\"%%i\" +for /f %%i in ('call git describe --always --dirty') do set compile=%compile% -DBUILD_GIT_HASH=\"%%i\" +for /f %%i in ('call git rev-parse HEAD') do set compile=%compile% -DBUILD_GIT_HASH_FULL=\"%%i\" +for /f %%i in ('call git rev-parse --abbrev-ref HEAD') do set compile=%compile% -DBUILD_GIT_BRANCH=\"%%i\" :: --- Build & Run Metaprogram ------------------------------------------------ if "%no_meta%"=="1" echo [skipping metagen] diff --git a/src/linker/lnk.c b/src/linker/lnk.c index 6bc79623..d3f1564a 100644 --- a/src/linker/lnk.c +++ b/src/linker/lnk.c @@ -10,7 +10,7 @@ #define BUILD_VERSION_PATCH 13 #define BUILD_RELEASE_PHASE_STRING_LITERAL "ALPHA" #define BUILD_VERSION_STRING Stringify(BUILD_VERSION_MAJOR) "." Stringify(BUILD_VERSION_MINOR) "." Stringify(BUILD_VERSION_PATCH) -#define BUILD_TITLE "Epic Games Tools (R) RAD COFF/PE Linker " BUILD_VERSION_STRING +#define BUILD_TITLE "Epic Games Tools (R) RAD COFF/PE Linker " BUILD_VERSION_STRING " (" BUILD_GIT_BRANCH "-" BUILD_GIT_HASH_FULL ")" ////////////////////////////////