Skip to content

Commit

Permalink
環境変数 SKIP_CREATE_GITHASH が 1 にセットされていて、 githash.h が存在していなかったら
Browse files Browse the repository at this point in the history
githash.h の生成をスキップするようにする。
  • Loading branch information
m-tmatma committed Aug 2, 2018
1 parent d12bb84 commit a3904da
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions sakura/githash.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a3904da

Please sign in to comment.