diff options
author | Anatol Belski <ab@php.net> | 2017-10-30 12:07:27 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2017-10-30 12:07:27 +0100 |
commit | e305e8fb7aac133095d11b80c10ebec9eeddaae3 (patch) | |
tree | e964c447a406f3dec22a706b4a51f18a2db62a12 /appveyor | |
parent | 7bf2947016dc840fcc2dcef8ef4f2003f00f7aef (diff) | |
download | php-git-e305e8fb7aac133095d11b80c10ebec9eeddaae3.tar.gz |
Ensure SDK is checked out before asking for version
Diffstat (limited to 'appveyor')
-rw-r--r-- | appveyor/build.bat | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/appveyor/build.bat b/appveyor/build.bat index e18b9a3dbb..1ad3d96123 100644 --- a/appveyor/build.bat +++ b/appveyor/build.bat @@ -13,19 +13,19 @@ if not exist "%PHP_BUILD_OBJ_DIR%" ( mkdir "%PHP_BUILD_OBJ_DIR%" ) -for /f "tokens=*" %%a in ('type %PHP_BUILD_CACHE_SDK_DIR%\VERSION') do set GOT_SDK_VER=%%a 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 ( - echo Got SDK version %GOT_SDK_VER% - if NOT "%GOT_SDK_VER%" == "%PHP_BUILD_SDK_BRANCH:~8%" ( - echo Updating to the configured SDK version %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 - git --git-dir="%PHP_BUILD_CACHE_SDK_DIR%\.git" --work-tree="%PHP_BUILD_CACHE_SDK_DIR%" checkout --force %SDK_BRANCH% - ) +) + +for /f "tokens=*" %%a in ('type %PHP_BUILD_CACHE_SDK_DIR%\VERSION') do set GOT_SDK_VER=%%a +echo Got SDK version %GOT_SDK_VER% +if NOT "%GOT_SDK_VER%" == "%PHP_BUILD_SDK_BRANCH:~8%" ( + echo Updating to the configured SDK version %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 + git --git-dir="%PHP_BUILD_CACHE_SDK_DIR%\.git" --work-tree="%PHP_BUILD_CACHE_SDK_DIR%" checkout --force %SDK_BRANCH% ) set SDK_RUNNER=%PHP_BUILD_CACHE_SDK_DIR%\phpsdk-vc14-%PLATFORM%.bat |