From bbba8d75a6d5a197ff362b93c18c9a7174cf8c2d Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Wed, 8 Dec 2021 19:28:08 +0530 Subject: [PATCH] Change primary script sources --- src/scripts/common.sh | 5 +++-- src/scripts/win32.ps1 | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/scripts/common.sh b/src/scripts/common.sh index 6cd1baf9..53f7b4f2 100644 --- a/src/scripts/common.sh +++ b/src/scripts/common.sh @@ -1,7 +1,7 @@ # Variables export tick="✓" export cross="✗" -export curl_opts=(-sL) +export curl_opts=(-L) export old_versions="5.[3-5]" export jit_versions="8.[0-9]" export nightly_versions="8.[2-9]" @@ -12,6 +12,7 @@ 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" @@ -76,7 +77,7 @@ run_script() { repo=$1 shift args=("$@") - get -q -e /tmp/install.sh "$github/$repo/$latest/install.sh" "$jsdeliver/$1@main/scripts/install.sh" + get -q -e /tmp/install.sh "$setup_php/$repo/install.sh" "$jsdeliver/$repo@main/scripts/install.sh" "$github/$repo/$latest/install.sh" bash /tmp/install.sh "${args[@]}" } diff --git a/src/scripts/win32.ps1 b/src/scripts/win32.ps1 index 28c43859..80886a1b 100644 --- a/src/scripts/win32.ps1 +++ b/src/scripts/win32.ps1 @@ -507,7 +507,7 @@ if($env:RUNNER -eq 'self-hosted') { Add-Printf >$null 2>&1 Step-Log "Setup PhpManager" -Install-PSPackage PhpManager PhpManager\PhpManager "$github/mlocati/powershell-phpmanager/releases/latest/download/PhpManager.zip" Get-Php >$null 2>&1 +Install-PSPackage PhpManager PhpManager\PhpManager https://setup-php.com/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 "$github/aaronparker/VcRedist/archive/main.zip" Get-VcList >$null 2>&1 + Install-PSPackage VcRedist VcRedist-main\VcRedist\VcRedist https://setup-php.com/VcRedist.zip Get-VcList >$null 2>&1 } try { 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 + Invoke-WebRequest -UseBasicParsing -Uri https://setup-php.com/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 ))"