neovars: Compose/ directory-specific revision info in make-compose.bat

"CompRevision" in the generated compose files now identifies the last
commit reachable from HEAD that affects the projects Compose/-directory.
Similarly, the "compose-tainted.generated.ahk" file is only created in
place of "compose.generated.ahk" if git diff reports changes that affect
tge Compose/-directory.
This commit is contained in:
ferdinym 2020-10-16 03:44:52 +02:00
parent 5788878de6
commit 181770f077
1 changed files with 2 additions and 2 deletions

View File

@ -11,11 +11,11 @@ REM The path to the directory used for generating a consistent SVN version (revi
set gitversiondir=..\..\..\Compose
echo Getting git revision
for /f "tokens=* USEBACKQ" %%R in (`"git rev-parse HEAD"`) do set CompRevision=%%R
for /f "tokens=* USEBACKQ" %%R in (`"git rev-list -n 1 HEAD -- %gitversiondir%"`) do set CompRevision=%%R
set CompRevision=%CompRevision:~0,7%
set fncomp=%srcdir%\compose.generated.ahk
git diff --exit-code > nul
git diff --quiet -- "%gitversiondir%" > nul
if %ERRORLEVEL% EQU 1 (
set fncomp=%srcdir%\compose-tainted.generated.ahk
)