mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Refactor PHP nightly setup in Windows
This commit is contained in:
parent
c1efd614e8
commit
da21b560da
@ -200,6 +200,16 @@ Function Set-PhpCache {
|
|||||||
} catch { }
|
} catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Function to install nightly version of PHP
|
||||||
|
Function Install-PhpNightly {
|
||||||
|
Invoke-WebRequest -UseBasicParsing -Uri $php_builder/releases/latest/download/Get-PhpNightly.ps1 -OutFile $php_dir\Get-PhpNightly.ps1 > $null 2>&1
|
||||||
|
& $php_dir\Get-PhpNightly.ps1 -Architecture $arch -ThreadSafe $ts -Path $php_dir -Version $version > $null 2>&1
|
||||||
|
if(Test-Path $php_dir\COMMIT) {
|
||||||
|
return " ($( Get-Content $php_dir\COMMIT ))"
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
$tick = ([char]8730)
|
$tick = ([char]8730)
|
||||||
$cross = ([char]10007)
|
$cross = ([char]10007)
|
||||||
@ -280,11 +290,7 @@ if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if ($version -match $nightly_versions) {
|
if ($version -match $nightly_versions) {
|
||||||
Invoke-WebRequest -UseBasicParsing -Uri $php_builder/releases/latest/download/Get-PhpNightly.ps1 -OutFile $php_dir\Get-PhpNightly.ps1 > $null 2>&1
|
$extra_version = Install-PhpNightly
|
||||||
& $php_dir\Get-PhpNightly.ps1 -Architecture $arch -ThreadSafe $ts -Path $php_dir -Version $version > $null 2>&1
|
|
||||||
if(Test-Path $php_dir\COMMIT) {
|
|
||||||
$extra_version = " ($( Get-Content $php_dir\COMMIT ))"
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
Set-PhpCache
|
Set-PhpCache
|
||||||
Install-Php -Version $version -Architecture $arch -ThreadSafe $ts -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni production -Force > $null 2>&1
|
Install-Php -Version $version -Architecture $arch -ThreadSafe $ts -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni production -Force > $null 2>&1
|
||||||
|
Loading…
Reference in New Issue
Block a user