mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 11:51:07 +07:00
Remove bintray from manifest and win32.ps1
Fix JIT ini values in win32.ps1
This commit is contained in:
parent
399ab79d14
commit
fa18c2b29f
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -2715,7 +2715,7 @@ exports.fetch = fetch;
|
||||
* @param version
|
||||
*/
|
||||
async function parseVersion(version) {
|
||||
const manifest = 'https://dl.bintray.com/shivammathur/php/php-versions.json';
|
||||
const manifest = 'https://raw.githubusercontent.com/shivammathur/setup-php/develop/src/configs/php-versions.json';
|
||||
switch (true) {
|
||||
case /^(latest|\d+\.x)$/.test(version):
|
||||
return JSON.parse(await fetch(manifest))[version];
|
||||
|
@ -78,7 +78,7 @@ run_script() {
|
||||
repo=$1
|
||||
shift
|
||||
args=("$@")
|
||||
get -q -e /tmp/install.sh "$bintray/php/$repo.sh" "$github/$repo/$latest/install.sh"
|
||||
get -q -e /tmp/install.sh "$github/$repo/$latest/install.sh" "$bintray/php/$repo.sh"
|
||||
bash /tmp/install.sh "${args[@]}"
|
||||
}
|
||||
|
||||
|
@ -340,7 +340,8 @@ $composer_json = "$env:APPDATA\Composer\composer.json"
|
||||
$composer_lock = "$env:APPDATA\Composer\composer.lock"
|
||||
$current_profile = "$env:TEMP\setup-php.ps1"
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
$nightly_version = '8.[0-9]'
|
||||
$jit_versions = '8.[0-9]'
|
||||
$nightly_versions = '8.[1-9]'
|
||||
$cert_source='CurrentUser'
|
||||
$enable_extensions = ('openssl', 'curl', 'mbstring')
|
||||
|
||||
@ -399,14 +400,17 @@ if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version
|
||||
Install-PSPackage VcRedist VcRedist-main\VcRedist\VcRedist "$github/aaronparker/VcRedist/archive/main.zip" >$null 2>&1
|
||||
}
|
||||
try {
|
||||
if ($version -match $nightly_version) {
|
||||
Invoke-WebRequest -Uri $bintray/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 ($version -match $nightly_versions) {
|
||||
Invoke-WebRequest -UseBasicParsing -Uri https://github.com/shivammathur/php-builder-windows/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 > $null 2>&1
|
||||
} else {
|
||||
Install-Php -Version $version -Architecture $arch -ThreadSafe $ts -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni Production -Force > $null 2>&1
|
||||
}
|
||||
} catch { }
|
||||
} else {
|
||||
if($version -match $jit_versions) {
|
||||
('opcache.enable=1', 'opcache.jit_buffer_size=256M', 'opcache.jit=1235') | ForEach-Object { $p=$_.split('='); Set-PhpIniKey -Key $p[0] -Value $p[1] -Path $php_dir }
|
||||
}
|
||||
if($env:update -eq 'true') {
|
||||
Update-Php $php_dir >$null 2>&1
|
||||
$status = "Updated to"
|
||||
|
@ -67,7 +67,8 @@ export async function fetch(url: string): Promise<string> {
|
||||
* @param version
|
||||
*/
|
||||
export async function parseVersion(version: string): Promise<string> {
|
||||
const manifest = 'https://dl.bintray.com/shivammathur/php/php-versions.json';
|
||||
const manifest =
|
||||
'https://raw.githubusercontent.com/shivammathur/setup-php/develop/src/configs/php-versions.json';
|
||||
switch (true) {
|
||||
case /^(latest|\d+\.x)$/.test(version):
|
||||
return JSON.parse(await fetch(manifest))[version];
|
||||
|
Loading…
Reference in New Issue
Block a user