Skip to content

Commit 0d16308

Browse files
committed
Win32: Proper way to detect actual PHP version [win build]
1 parent f949713 commit 0d16308

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.appveyor.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,11 @@ install:
7171
# ==================================================
7272
- echo Setting PHP version...
7373
# ==================================================
74-
- ps: Start-FileDownload 'http://windows.php.net/downloads/releases/sha1sum.txt'
75-
- ps: $env:PHP_VERSION=type sha1sum.txt | where { $_ -match "php-(${env:PHP_TARGET}\.\d+)-src" } | foreach { $matches[1] }
74+
- ps: appveyor DownloadFile 'http://windows.php.net/downloads/releases/sha1sum.txt'
75+
- ps: |
76+
$versions = type sha1sum.txt | where { $_ -match "php-(${env:PHP_TARGET}\.\d+)-src" } | foreach { $matches[1] }
77+
$version = $versions.Split(' ')[-1]
78+
$env:PHP_VERSION=${version}
7679
- ps: $env:PHP_PLATFORM="${env:PHP_SDK}\phpdev\vc${env:PHP_VC}\${env:PLATFORM}"
7780
- ps: $env:PHP_SRC="${env:PHP_PLATFORM}\php-${env:PHP_VERSION}-src"
7881
- ps: >-

0 commit comments

Comments
 (0)