Revert to GitHub Releases as primary script source

This commit is contained in:
Shivam Mathur 2021-12-08 20:34:44 +05:30
parent bbba8d75a6
commit 1b4cc0b6fa
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
2 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
# Variables # Variables
export tick="✓" export tick="✓"
export cross="✗" export cross="✗"
export curl_opts=(-L) export curl_opts=(-sL)
export old_versions="5.[3-5]" export old_versions="5.[3-5]"
export jit_versions="8.[0-9]" export jit_versions="8.[0-9]"
export nightly_versions="8.[2-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_json="$composer_home/composer.json"
export composer_lock="$composer_home/composer.lock" export composer_lock="$composer_home/composer.lock"
export latest="releases/latest/download" export latest="releases/latest/download"
export setup_php="https://setup-php.com"
export github="https://github.com/shivammathur" export github="https://github.com/shivammathur"
export jsdeliver="https://cdn.jsdelivr.net/gh/shivammathur" export jsdeliver="https://cdn.jsdelivr.net/gh/shivammathur"
export setup_php="https://setup-php.com"
# Function to log start of a operation. # Function to log start of a operation.
step_log() { step_log() {
@ -77,7 +77,7 @@ run_script() {
repo=$1 repo=$1
shift shift
args=("$@") 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[@]}" bash /tmp/install.sh "${args[@]}"
} }

View File

@ -507,7 +507,7 @@ if($env:RUNNER -eq 'self-hosted') {
Add-Printf >$null 2>&1 Add-Printf >$null 2>&1
Step-Log "Setup PhpManager" 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" Add-Log $tick "PhpManager" "Installed"
Step-Log "Setup PHP" Step-Log "Setup PHP"
@ -527,11 +527,11 @@ $status = "Installed"
$extra_version = "" $extra_version = ""
if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version -replace '^(\d+(\.\d+)*).*', '$1.'))) -or $ts -ne $installed.ThreadSafe) { 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') { 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 { try {
if ($version -match $nightly_versions) { 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 & $php_dir\Get-PhpNightly.ps1 -Architecture $arch -ThreadSafe $ts -Path $php_dir -Version $version > $null 2>&1
if(Test-Path $php_dir\COMMIT) { if(Test-Path $php_dir\COMMIT) {
$extra_version = " ($( Get-Content $php_dir\COMMIT ))" $extra_version = " ($( Get-Content $php_dir\COMMIT ))"