Remove bintray from manifest and win32.ps1

Fix JIT ini values in win32.ps1
This commit is contained in:
Shivam Mathur 2021-02-23 13:59:28 +05:30
parent 399ab79d14
commit fa18c2b29f
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
4 changed files with 12 additions and 7 deletions

2
dist/index.js vendored
View File

@ -2715,7 +2715,7 @@ exports.fetch = fetch;
* @param version * @param version
*/ */
async function parseVersion(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) { switch (true) {
case /^(latest|\d+\.x)$/.test(version): case /^(latest|\d+\.x)$/.test(version):
return JSON.parse(await fetch(manifest))[version]; return JSON.parse(await fetch(manifest))[version];

View File

@ -78,7 +78,7 @@ run_script() {
repo=$1 repo=$1
shift shift
args=("$@") 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[@]}" bash /tmp/install.sh "${args[@]}"
} }

View File

@ -340,7 +340,8 @@ $composer_json = "$env:APPDATA\Composer\composer.json"
$composer_lock = "$env:APPDATA\Composer\composer.lock" $composer_lock = "$env:APPDATA\Composer\composer.lock"
$current_profile = "$env:TEMP\setup-php.ps1" $current_profile = "$env:TEMP\setup-php.ps1"
$ProgressPreference = 'SilentlyContinue' $ProgressPreference = 'SilentlyContinue'
$nightly_version = '8.[0-9]' $jit_versions = '8.[0-9]'
$nightly_versions = '8.[1-9]'
$cert_source='CurrentUser' $cert_source='CurrentUser'
$enable_extensions = ('openssl', 'curl', 'mbstring') $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 Install-PSPackage VcRedist VcRedist-main\VcRedist\VcRedist "$github/aaronparker/VcRedist/archive/main.zip" >$null 2>&1
} }
try { try {
if ($version -match $nightly_version) { if ($version -match $nightly_versions) {
Invoke-WebRequest -Uri $bintray/Get-PhpNightly.ps1 -OutFile $php_dir\Get-PhpNightly.ps1 > $null 2>&1 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 -Version $version > $null 2>&1 & $php_dir\Get-PhpNightly.ps1 -Architecture $arch -ThreadSafe $ts -Path $php_dir > $null 2>&1
} else { } else {
Install-Php -Version $version -Architecture $arch -ThreadSafe $ts -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni Production -Force > $null 2>&1 Install-Php -Version $version -Architecture $arch -ThreadSafe $ts -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni Production -Force > $null 2>&1
} }
} catch { } } catch { }
} else { } 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') { if($env:update -eq 'true') {
Update-Php $php_dir >$null 2>&1 Update-Php $php_dir >$null 2>&1
$status = "Updated to" $status = "Updated to"

View File

@ -67,7 +67,8 @@ export async function fetch(url: string): Promise<string> {
* @param version * @param version
*/ */
export async function parseVersion(version: string): Promise<string> { 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) { switch (true) {
case /^(latest|\d+\.x)$/.test(version): case /^(latest|\d+\.x)$/.test(version):
return JSON.parse(await fetch(manifest))[version]; return JSON.parse(await fetch(manifest))[version];