diff --git a/sakura/githash.bat b/sakura/githash.bat index 1bd224ffa0..dd4c40f4d7 100644 --- a/sakura/githash.bat +++ b/sakura/githash.bat @@ -88,6 +88,20 @@ if "%APPVEYOR_BUILD_URL_VALID%" == "1" ( set GITHASH_H=%OUT_DIR%\githash.h set GITHASH_H_TMP=%GITHASH_H%.tmp +@rem check if skip creation of %GITHASH_H% +set VALID_CREATE_GITHASH=1 +if "%SKIP_CREATE_GITHASH%" == "1" ( + set VALID_CREATE_GITHASH=0 +) +if not exist "%GITHASH_H%" ( + set VALID_CREATE_GITHASH=1 +) + +if "%VALID_CREATE_GITHASH%" == "0" ( + @echo skip creation of %GITHASH_H% + exit /b 0 +) + call :output_githash > %GITHASH_H_TMP% fc %GITHASH_H% %GITHASH_H_TMP% 1>nul 2>&1