From 0d16308092c2ff663dfc73e44a654e64d66362be Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Thu, 12 Oct 2017 10:56:49 +0300 Subject: [PATCH] Win32: Proper way to detect actual PHP version [win build] --- .appveyor.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 67b25795..6159e350 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -71,8 +71,11 @@ install: # ================================================== - echo Setting PHP version... # ================================================== - - ps: Start-FileDownload 'http://windows.php.net/downloads/releases/sha1sum.txt' - - ps: $env:PHP_VERSION=type sha1sum.txt | where { $_ -match "php-(${env:PHP_TARGET}\.\d+)-src" } | foreach { $matches[1] } + - ps: appveyor DownloadFile 'http://windows.php.net/downloads/releases/sha1sum.txt' + - ps: | + $versions = type sha1sum.txt | where { $_ -match "php-(${env:PHP_TARGET}\.\d+)-src" } | foreach { $matches[1] } + $version = $versions.Split(' ')[-1] + $env:PHP_VERSION=${version} - ps: $env:PHP_PLATFORM="${env:PHP_SDK}\phpdev\vc${env:PHP_VC}\${env:PLATFORM}" - ps: $env:PHP_SRC="${env:PHP_PLATFORM}\php-${env:PHP_VERSION}-src" - ps: >-