mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-22 00:05:37 +08:00
default extract for pie sources
This commit is contained in:
@@ -4,7 +4,6 @@ ext-ev:
|
||||
source:
|
||||
type: pie
|
||||
repo: osmanov/pecl-ev
|
||||
extract: php-src/ext/ev
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
license: PHP-3.01
|
||||
|
||||
@@ -4,7 +4,6 @@ ext-grpc:
|
||||
source:
|
||||
type: pie
|
||||
repo: grpc/grpc-php-ext
|
||||
extract: php-src/ext/grpc
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
license: Apache-2.0
|
||||
|
||||
@@ -4,7 +4,6 @@ ext-imagick:
|
||||
source:
|
||||
type: pie
|
||||
repo: imagick/imagick
|
||||
extract: php-src/ext/imagick
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
license: PHP-3.01
|
||||
|
||||
@@ -4,7 +4,6 @@ ext-inotify:
|
||||
source:
|
||||
type: pie
|
||||
repo: arnaud-lb/inotify
|
||||
extract: php-src/ext/inotify
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
license: PHP-3.01
|
||||
|
||||
@@ -4,7 +4,6 @@ ext-memcached:
|
||||
source:
|
||||
type: pie
|
||||
repo: php-memcached/php-memcached
|
||||
extract: php-src/ext/memcached
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
license: PHP-3.01
|
||||
|
||||
@@ -4,7 +4,6 @@ ext-msgpack:
|
||||
source:
|
||||
type: pie
|
||||
repo: msgpack/msgpack-php
|
||||
extract: php-src/ext/msgpack
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
license: BSD-3-Clause
|
||||
|
||||
@@ -4,7 +4,6 @@ ext-mysqlnd_ed25519:
|
||||
source:
|
||||
type: pie
|
||||
repo: mariadb/mysqlnd_ed25519
|
||||
extract: php-src/ext/mysqlnd_ed25519
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
license: BSD-3-Clause
|
||||
|
||||
@@ -4,7 +4,6 @@ ext-mysqlnd_parsec:
|
||||
source:
|
||||
type: pie
|
||||
repo: mariadb/mysqlnd_parsec
|
||||
extract: php-src/ext/mysqlnd_parsec
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
license: BSD-3-Clause
|
||||
|
||||
@@ -4,7 +4,6 @@ ext-opentelemetry:
|
||||
source:
|
||||
type: pie
|
||||
repo: open-telemetry/ext-opentelemetry
|
||||
extract: php-src/ext/opentelemetry
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
license: Apache-2.0
|
||||
|
||||
@@ -4,7 +4,6 @@ ext-parallel:
|
||||
source:
|
||||
type: pie
|
||||
repo: pecl/parallel
|
||||
extract: php-src/ext/parallel
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
license: PHP-3.01
|
||||
|
||||
@@ -4,7 +4,6 @@ ext-pcov:
|
||||
source:
|
||||
type: pie
|
||||
repo: pecl/pcov
|
||||
extract: php-src/ext/pcov
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
license: PHP-3.01
|
||||
|
||||
@@ -4,7 +4,6 @@ ext-redis:
|
||||
source:
|
||||
type: pie
|
||||
repo: phpredis/phpredis
|
||||
extract: php-src/ext/redis
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
license: PHP-3.01
|
||||
|
||||
@@ -4,7 +4,6 @@ ext-spx:
|
||||
source:
|
||||
type: pie
|
||||
repo: noisebynorthwest/php-spx
|
||||
extract: php-src/ext/spx
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
license: GPL-3.0-or-later
|
||||
|
||||
@@ -4,7 +4,6 @@ ext-uuid:
|
||||
source:
|
||||
type: pie
|
||||
repo: pecl/uuid
|
||||
extract: php-src/ext/uuid
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
license: LGPL-2.1-only
|
||||
|
||||
@@ -4,7 +4,6 @@ ext-xlswriter:
|
||||
source:
|
||||
type: pie
|
||||
repo: viest/xlswriter
|
||||
extract: php-src/ext/xlswriter
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
license: BSD-2-Clause
|
||||
|
||||
@@ -4,7 +4,6 @@ ext-zip:
|
||||
source:
|
||||
type: pie
|
||||
repo: pecl/zip
|
||||
extract: php-src/ext/zip
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
license: PHP-3.01
|
||||
|
||||
@@ -22,12 +22,13 @@ class PIE implements DownloadTypeInterface, CheckUpdateInterface
|
||||
if (!$dist_url || !$dist_type) {
|
||||
throw new DownloaderException("failed to find {$name} dist info from packagist");
|
||||
}
|
||||
$extract = $config['extract'] ?? ('php-src/ext/' . strtolower(preg_replace('/^ext-/i', '', $name)));
|
||||
$name = str_replace('/', '_', $config['repo']);
|
||||
$version = $first['version'] ?? 'unknown';
|
||||
$filename = "{$name}-{$version}." . ($dist_type === 'zip' ? 'zip' : 'tar.gz');
|
||||
$path = DOWNLOAD_PATH . DIRECTORY_SEPARATOR . $filename;
|
||||
default_shell()->executeCurlDownload($dist_url, $path, retries: $downloader->getRetry());
|
||||
return DownloadResult::archive($filename, $config, $config['extract'] ?? null, version: $version, downloader: static::class);
|
||||
return DownloadResult::archive($filename, $config, $extract, version: $version, downloader: static::class);
|
||||
}
|
||||
|
||||
public function checkUpdate(string $name, array $config, ?string $old_version, ArtifactDownloader $downloader): CheckUpdateResult
|
||||
|
||||
Reference in New Issue
Block a user