File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
extension/BuildPhpExtension/private Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -17,20 +17,12 @@ Function Add-PhpDependencies {
1717 Add-StepLog " Adding libraries (core)"
1818 }
1919 $phpBaseUrl = ' https://downloads.php.net/~windows/php-sdk/deps'
20- $phpSeries = Invoke-WebRequest - Uri " $phpBaseUrl /$ ( $Config.vs_version ) / $ ( $Config.arch ) "
20+ $phpSeries = Invoke-WebRequest - Uri " $phpBaseUrl /series/packages- $ ( $Config.php_version ) - $ ( $Config . vs_version) - $ ( $Config.arch ) -staging.txt " - UseBasicParsing
2121 foreach ($library in $Config.php_libraries ) {
2222 try {
23- $installed = $null
24- foreach ($file in $phpSeries.Links.Href ) {
25- if ($file -match " ^$library " ) {
26- Invoke-WebRequest " $phpBaseUrl /$ ( $Config.vs_version ) /$ ( $Config.arch ) /$file " - OutFile $library
27- Expand-Archive $library " ../deps"
28- $installed = $file
29- break
30- }
31- }
32- if (-not $installed ) {
33- throw " Failed to download $library "
23+ $matches = $phpSeries.Content | Select-String - Pattern " (^|\n)$library .*"
24+ if ($matches.Count -eq 0 ) {
25+ throw " Failed to find $library "
3426 }
3527 $file = $matches.Matches [0 ].Value.Trim()
3628 Invoke-WebRequest " $phpBaseUrl /$ ( $Config.vs_version ) /$ ( $Config.arch ) /$file " - OutFile $library
You can’t perform that action at this time.
0 commit comments