Use path for download

This commit is contained in:
Jenny Tam 2018-02-20 16:46:53 -08:00
parent 774d2e5251
commit c12c0c0cd8

View file

@ -82,9 +82,9 @@ install:
- ps: >-
$client = New-Object Net.WebClient;
$client.Headers.Add("user-agent", "appveyor-ci-build");
$client.DownloadFile('http://windows.php.net/downloads/releases/sha1sum.txt','sha1sum.txt');
$client.DownloadFile('http://windows.php.net/downloads/releases/sha1sum.txt','c:\projects\sha1sum.txt');
If ($env:PHP_MINOR_VER -Match "latest") {
$env:PHP_VERSION=type sha1sum.txt | where { $_ -match "php-($env:PHP_MAJOR_VER\.\d+)-src" } | foreach { $matches[1] } ;
$env:PHP_VERSION=type c:\projects\sha1sum.txt | where { $_ -match "php-($env:PHP_MAJOR_VER\.\d+)-src" } | foreach { $matches[1] } ;
} Else {
$env:PHP_VERSION=$env:PHP_MAJOR_VER + '.' + $env:PHP_MINOR_VER;
}