Skip to content

Commit

Permalink
Remove status check on the SDK repo and add version check
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
weltling committed Oct 30, 2017
1 parent 741efa7 commit bc410c2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions appveyor/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bc410c2

Please sign in to comment.