Browse Source

Remove status check on the SDK repo and add version check

If Appveyor fails to unzip, .git would be in an arbitrary state anyway.
Thus this check doesn't help. For the version check - rely on the branch
naming scheme in the SDK.
pull/2887/head
Anatol Belski 9 years ago
parent
commit
bc410c2609
  1. 8
      appveyor/build.bat

8
appveyor/build.bat

@ -17,12 +17,8 @@ if not exist "%PHP_BUILD_CACHE_SDK_DIR%" (
echo Cloning remote SDK repository
git clone --branch %SDK_BRANCH% %SDK_REMOTE% "%PHP_BUILD_CACHE_SDK_DIR%" 2>&1
) else (
git --git-dir="%PHP_BUILD_CACHE_SDK_DIR%\.git" --work-tree="%PHP_BUILD_CACHE_SDK_DIR%" status 2>&1
if %errorlevel% neq 0 (
rmdir /s /q "%PHP_BUILD_CACHE_SDK_DIR%"
echo Cloning remote SDK repository
git clone --branch %SDK_BRANCH% %SDK_REMOTE% "%PHP_BUILD_CACHE_SDK_DIR%" 2>&1
) else (
for /f "tokens=*" %%a in ('type %PHP_BUILD_CACHE_SDK_DIR%\VERSION') do set GOT_SDK_VER=%%a
if "%GOT_SDK_VER%" NEQ "%SDK_BRANCH:~8%" (
echo Fetching remote SDK repository
git --git-dir="%PHP_BUILD_CACHE_SDK_DIR%\.git" --work-tree="%PHP_BUILD_CACHE_SDK_DIR%" fetch --prune origin 2>&1
echo Checkout SDK repository branch

Loading…
Cancel
Save