diff options
author | Anatol Belski <ab@php.net> | 2017-10-30 10:14:05 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2017-10-30 10:14:05 +0100 |
commit | bc410c2609adb6141aced2b52e6c7aa91a5d5b2d (patch) | |
tree | c1b27d172855870403e178bebbca89b2a94a6af4 /appveyor | |
parent | 741efa78074388c9aebf9be9789b68fe0ab3ec24 (diff) | |
download | php-git-bc410c2609adb6141aced2b52e6c7aa91a5d5b2d.tar.gz |
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.
Diffstat (limited to 'appveyor')
-rw-r--r-- | appveyor/build.bat | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/appveyor/build.bat b/appveyor/build.bat index a27abc2660..22c617f11c 100644 --- a/appveyor/build.bat +++ b/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 |