mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Change primary script sources
This commit is contained in:
parent
a274bd910a
commit
bbba8d75a6
@ -1,7 +1,7 @@
|
|||||||
# Variables
|
# Variables
|
||||||
export tick="✓"
|
export tick="✓"
|
||||||
export cross="✗"
|
export cross="✗"
|
||||||
export curl_opts=(-sL)
|
export curl_opts=(-L)
|
||||||
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,6 +12,7 @@ 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"
|
||||||
|
|
||||||
@ -76,7 +77,7 @@ run_script() {
|
|||||||
repo=$1
|
repo=$1
|
||||||
shift
|
shift
|
||||||
args=("$@")
|
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[@]}"
|
bash /tmp/install.sh "${args[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 "$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"
|
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 "$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 {
|
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
|
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
|
& $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 ))"
|
||||||
|
Loading…
Reference in New Issue
Block a user