Skip to content

Commit

Permalink
Revert to GitHub Releases as primary script source
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Dec 8, 2021
1 parent bbba8d7 commit 1b4cc0b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/scripts/common.sh
Original file line number Diff line number Diff line change
@@ -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]"
Expand All @@ -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() {
Expand Down Expand Up @@ -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[@]}"
}

Expand Down
6 changes: 3 additions & 3 deletions src/scripts/win32.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 ))"
Expand Down

0 comments on commit 1b4cc0b

Please sign in to comment.