mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-25 01:45:35 +08:00
igbinary PIE
This commit is contained in:
@@ -2,9 +2,9 @@ ext-igbinary:
|
||||
type: php-extension
|
||||
artifact:
|
||||
source:
|
||||
type: ghtagtar
|
||||
type: pie
|
||||
repo: igbinary/igbinary
|
||||
match: tags/\d+(\.\d+)+$
|
||||
prefer-stable: false
|
||||
extract: php-src/ext/igbinary
|
||||
metadata:
|
||||
license-files: [COPYING]
|
||||
|
||||
@@ -65,14 +65,17 @@ class PIE implements DownloadTypeInterface, CheckUpdateInterface
|
||||
$current = array_filter($current, static fn ($v) => $v !== '__unset');
|
||||
$releases[] = $current;
|
||||
}
|
||||
// packagist lists newest first including RC/beta/alpha — pick the newest stable release
|
||||
// packagist lists newest first including RC/beta/alpha — pick the newest stable release,
|
||||
// unless prefer-stable is false, then take the newest tagged release even if it's a prerelease
|
||||
$first = null;
|
||||
if ($config['prefer-stable'] ?? true) {
|
||||
foreach ($releases as $release) {
|
||||
if (!preg_match('/[._-]?(?:alpha|a|beta|b|rc)[._-]?\d*$/i', $release['version'] ?? '')) {
|
||||
$first = $release;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$first ??= $releases[0] ?? [];
|
||||
if (!isset($first['php-ext'])) {
|
||||
throw new DownloaderException("failed to find {$name} php-ext info from packagist, maybe not a php extension package");
|
||||
|
||||
@@ -101,7 +101,7 @@ class ConfigValidator
|
||||
'url' => [['url'], ['filename', 'extract', 'version']],
|
||||
'bitbuckettag' => [['repo'], ['extract']],
|
||||
'local' => [['dirname'], ['extract']],
|
||||
'pie' => [['repo'], ['extract']],
|
||||
'pie' => [['repo'], ['extract', 'prefer-stable']],
|
||||
'pecl' => [['name'], ['extract', 'prefer-stable']],
|
||||
'php-release' => [['domain'], ['extract']],
|
||||
'custom' => [[], ['func']],
|
||||
|
||||
Reference in New Issue
Block a user