From 1adf36ccb2b9e230d015cf6ba4b0026408ad383e Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 8 Dec 2024 02:57:32 +1000 Subject: [PATCH] Build: Fix out-of-tree CMake scmversion extraction on Windows --- src/scmversion/gen_scmversion.bat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scmversion/gen_scmversion.bat b/src/scmversion/gen_scmversion.bat index 007a93887..52307a215 100644 --- a/src/scmversion/gen_scmversion.bat +++ b/src/scmversion/gen_scmversion.bat @@ -1,10 +1,12 @@ @echo off SET VERSIONFILE="scmversion.cpp" +PUSHD %~dp0 FOR /F "tokens=* USEBACKQ" %%g IN (`git rev-parse HEAD`) do (SET "HASH=%%g") FOR /F "tokens=* USEBACKQ" %%g IN (`git rev-parse --abbrev-ref HEAD`) do (SET "BRANCH=%%g") FOR /F "tokens=* USEBACKQ" %%g IN (`git describe --dirty`) do (SET "TAG=%%g") FOR /F "tokens=* USEBACKQ" %%g IN (`git log -1 --date=iso8601-strict "--format=%%cd"`) do (SET "CDATE=%%g") +POPD SET SIGNATURELINE=// %HASH% %BRANCH% %TAG% %CDATE% SET /P EXISTINGLINE=< %VERSIONFILE%