Skip to content

Commit

Permalink
Win32: Proper way to detect actual PHP version [win build]
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyklay committed Oct 12, 2017
1 parent f949713 commit 0d16308
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >-
Expand Down

0 comments on commit 0d16308

Please sign in to comment.