mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Revert to GitHub Releases as primary script source
This commit is contained in:
parent
bbba8d75a6
commit
1b4cc0b6fa
@ -1,7 +1,7 @@
|
||||
# Variables
|
||||
export tick="✓"
|
||||
export cross="✗"
|
||||
export curl_opts=(-L)
|
||||
export curl_opts=(-sL)
|
||||
export old_versions="5.[3-5]"
|
||||
export jit_versions="8.[0-9]"
|
||||
export nightly_versions="8.[2-9]"
|
||||
@ -12,9 +12,9 @@ export composer_bin="$composer_home/vendor/bin"
|
||||
export composer_json="$composer_home/composer.json"
|
||||
export composer_lock="$composer_home/composer.lock"
|
||||
export latest="releases/latest/download"
|
||||
export setup_php="https://setup-php.com"
|
||||
export github="https://github.com/shivammathur"
|
||||
export jsdeliver="https://cdn.jsdelivr.net/gh/shivammathur"
|
||||
export setup_php="https://setup-php.com"
|
||||
|
||||
# Function to log start of a operation.
|
||||
step_log() {
|
||||
@ -77,7 +77,7 @@ run_script() {
|
||||
repo=$1
|
||||
shift
|
||||
args=("$@")
|
||||
get -q -e /tmp/install.sh "$setup_php/$repo/install.sh" "$jsdeliver/$repo@main/scripts/install.sh" "$github/$repo/$latest/install.sh"
|
||||
get -q -e /tmp/install.sh "$github/$repo/$latest/install.sh" "$jsdeliver/$repo@main/scripts/install.sh" "$setup_php/$repo/install.sh"
|
||||
bash /tmp/install.sh "${args[@]}"
|
||||
}
|
||||
|
||||
|
@ -507,7 +507,7 @@ if($env:RUNNER -eq 'self-hosted') {
|
||||
|
||||
Add-Printf >$null 2>&1
|
||||
Step-Log "Setup PhpManager"
|
||||
Install-PSPackage PhpManager PhpManager\PhpManager https://setup-php.com/PhpManager.zip Get-Php >$null 2>&1
|
||||
Install-PSPackage PhpManager PhpManager\PhpManager "$github/mlocati/powershell-phpmanager/releases/latest/download/PhpManager.zip" Get-Php >$null 2>&1
|
||||
Add-Log $tick "PhpManager" "Installed"
|
||||
|
||||
Step-Log "Setup PHP"
|
||||
@ -527,11 +527,11 @@ $status = "Installed"
|
||||
$extra_version = ""
|
||||
if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version -replace '^(\d+(\.\d+)*).*', '$1.'))) -or $ts -ne $installed.ThreadSafe) {
|
||||
if ($version -lt '7.0' -and (Get-InstalledModule).Name -notcontains 'VcRedist') {
|
||||
Install-PSPackage VcRedist VcRedist-main\VcRedist\VcRedist https://setup-php.com/VcRedist.zip Get-VcList >$null 2>&1
|
||||
Install-PSPackage VcRedist VcRedist-main\VcRedist\VcRedist "$github/aaronparker/VcRedist/archive/main.zip" Get-VcList >$null 2>&1
|
||||
}
|
||||
try {
|
||||
if ($version -match $nightly_versions) {
|
||||
Invoke-WebRequest -UseBasicParsing -Uri https://setup-php.com/Get-PhpNightly.ps1 -OutFile $php_dir\Get-PhpNightly.ps1 > $null 2>&1
|
||||
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) {
|
||||
$extra_version = " ($( Get-Content $php_dir\COMMIT ))"
|
||||
|
Loading…
Reference in New Issue
Block a user