Skip to content

Commit

Permalink
build(appveyor): invalidate build cache when thirdparty modules are u…
Browse files Browse the repository at this point in the history
…pdated [skip travis]
  • Loading branch information
lotem committed Sep 20, 2020
1 parent ec5717a commit bb2a616
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ for:

cache:
- thirdparty.cached -> appveyor_build_thirdparty.bat
- thirdparty.submodule-status -> appveyor_build_thirdparty.bat
- thirdparty\bin -> appveyor_build_thirdparty.bat
- thirdparty\include -> appveyor_build_thirdparty.bat
- thirdparty\lib -> appveyor_build_thirdparty.bat
Expand Down
9 changes: 9 additions & 0 deletions appveyor_build_thirdparty.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,20 @@ set nocache=0

if not exist thirdparty.cached set nocache=1

git submodule status > thirdparty.submodule-status.new
if not exist thirdparty.submodule-status (
set nocache=1
) else (
fc thirdparty.submodule-status thirdparty.submodule-status.new
if errorlevel 1 set nocache=1
)

if %nocache% == 1 (
git submodule update --init
call .\build.bat thirdparty
if errorlevel 1 goto error

copy /y thirdparty.submodule-status.new thirdparty.submodule-status
date /t > thirdparty.cached & time /t >> thirdparty.cached
echo.
echo Thirdparty libraries installed.
Expand Down

0 comments on commit bb2a616

Please sign in to comment.