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:
|
source:
|
||||||
type: pie
|
type: pie
|
||||||
repo: osmanov/pecl-ev
|
repo: osmanov/pecl-ev
|
||||||
extract: php-src/ext/ev
|
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [LICENSE]
|
license-files: [LICENSE]
|
||||||
license: PHP-3.01
|
license: PHP-3.01
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ ext-grpc:
|
|||||||
source:
|
source:
|
||||||
type: pie
|
type: pie
|
||||||
repo: grpc/grpc-php-ext
|
repo: grpc/grpc-php-ext
|
||||||
extract: php-src/ext/grpc
|
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [LICENSE]
|
license-files: [LICENSE]
|
||||||
license: Apache-2.0
|
license: Apache-2.0
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ ext-imagick:
|
|||||||
source:
|
source:
|
||||||
type: pie
|
type: pie
|
||||||
repo: imagick/imagick
|
repo: imagick/imagick
|
||||||
extract: php-src/ext/imagick
|
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [LICENSE]
|
license-files: [LICENSE]
|
||||||
license: PHP-3.01
|
license: PHP-3.01
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ ext-inotify:
|
|||||||
source:
|
source:
|
||||||
type: pie
|
type: pie
|
||||||
repo: arnaud-lb/inotify
|
repo: arnaud-lb/inotify
|
||||||
extract: php-src/ext/inotify
|
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [LICENSE]
|
license-files: [LICENSE]
|
||||||
license: PHP-3.01
|
license: PHP-3.01
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ ext-memcached:
|
|||||||
source:
|
source:
|
||||||
type: pie
|
type: pie
|
||||||
repo: php-memcached/php-memcached
|
repo: php-memcached/php-memcached
|
||||||
extract: php-src/ext/memcached
|
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [LICENSE]
|
license-files: [LICENSE]
|
||||||
license: PHP-3.01
|
license: PHP-3.01
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ ext-msgpack:
|
|||||||
source:
|
source:
|
||||||
type: pie
|
type: pie
|
||||||
repo: msgpack/msgpack-php
|
repo: msgpack/msgpack-php
|
||||||
extract: php-src/ext/msgpack
|
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [LICENSE]
|
license-files: [LICENSE]
|
||||||
license: BSD-3-Clause
|
license: BSD-3-Clause
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ ext-mysqlnd_ed25519:
|
|||||||
source:
|
source:
|
||||||
type: pie
|
type: pie
|
||||||
repo: mariadb/mysqlnd_ed25519
|
repo: mariadb/mysqlnd_ed25519
|
||||||
extract: php-src/ext/mysqlnd_ed25519
|
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [LICENSE]
|
license-files: [LICENSE]
|
||||||
license: BSD-3-Clause
|
license: BSD-3-Clause
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ ext-mysqlnd_parsec:
|
|||||||
source:
|
source:
|
||||||
type: pie
|
type: pie
|
||||||
repo: mariadb/mysqlnd_parsec
|
repo: mariadb/mysqlnd_parsec
|
||||||
extract: php-src/ext/mysqlnd_parsec
|
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [LICENSE]
|
license-files: [LICENSE]
|
||||||
license: BSD-3-Clause
|
license: BSD-3-Clause
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ ext-opentelemetry:
|
|||||||
source:
|
source:
|
||||||
type: pie
|
type: pie
|
||||||
repo: open-telemetry/ext-opentelemetry
|
repo: open-telemetry/ext-opentelemetry
|
||||||
extract: php-src/ext/opentelemetry
|
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [LICENSE]
|
license-files: [LICENSE]
|
||||||
license: Apache-2.0
|
license: Apache-2.0
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ ext-parallel:
|
|||||||
source:
|
source:
|
||||||
type: pie
|
type: pie
|
||||||
repo: pecl/parallel
|
repo: pecl/parallel
|
||||||
extract: php-src/ext/parallel
|
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [LICENSE]
|
license-files: [LICENSE]
|
||||||
license: PHP-3.01
|
license: PHP-3.01
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ ext-pcov:
|
|||||||
source:
|
source:
|
||||||
type: pie
|
type: pie
|
||||||
repo: pecl/pcov
|
repo: pecl/pcov
|
||||||
extract: php-src/ext/pcov
|
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [LICENSE]
|
license-files: [LICENSE]
|
||||||
license: PHP-3.01
|
license: PHP-3.01
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ ext-redis:
|
|||||||
source:
|
source:
|
||||||
type: pie
|
type: pie
|
||||||
repo: phpredis/phpredis
|
repo: phpredis/phpredis
|
||||||
extract: php-src/ext/redis
|
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [LICENSE]
|
license-files: [LICENSE]
|
||||||
license: PHP-3.01
|
license: PHP-3.01
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ ext-spx:
|
|||||||
source:
|
source:
|
||||||
type: pie
|
type: pie
|
||||||
repo: noisebynorthwest/php-spx
|
repo: noisebynorthwest/php-spx
|
||||||
extract: php-src/ext/spx
|
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [LICENSE]
|
license-files: [LICENSE]
|
||||||
license: GPL-3.0-or-later
|
license: GPL-3.0-or-later
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ ext-uuid:
|
|||||||
source:
|
source:
|
||||||
type: pie
|
type: pie
|
||||||
repo: pecl/uuid
|
repo: pecl/uuid
|
||||||
extract: php-src/ext/uuid
|
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [LICENSE]
|
license-files: [LICENSE]
|
||||||
license: LGPL-2.1-only
|
license: LGPL-2.1-only
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ ext-xlswriter:
|
|||||||
source:
|
source:
|
||||||
type: pie
|
type: pie
|
||||||
repo: viest/xlswriter
|
repo: viest/xlswriter
|
||||||
extract: php-src/ext/xlswriter
|
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [LICENSE]
|
license-files: [LICENSE]
|
||||||
license: BSD-2-Clause
|
license: BSD-2-Clause
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ ext-zip:
|
|||||||
source:
|
source:
|
||||||
type: pie
|
type: pie
|
||||||
repo: pecl/zip
|
repo: pecl/zip
|
||||||
extract: php-src/ext/zip
|
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [LICENSE]
|
license-files: [LICENSE]
|
||||||
license: PHP-3.01
|
license: PHP-3.01
|
||||||
|
|||||||
@@ -22,12 +22,13 @@ class PIE implements DownloadTypeInterface, CheckUpdateInterface
|
|||||||
if (!$dist_url || !$dist_type) {
|
if (!$dist_url || !$dist_type) {
|
||||||
throw new DownloaderException("failed to find {$name} dist info from packagist");
|
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']);
|
$name = str_replace('/', '_', $config['repo']);
|
||||||
$version = $first['version'] ?? 'unknown';
|
$version = $first['version'] ?? 'unknown';
|
||||||
$filename = "{$name}-{$version}." . ($dist_type === 'zip' ? 'zip' : 'tar.gz');
|
$filename = "{$name}-{$version}." . ($dist_type === 'zip' ? 'zip' : 'tar.gz');
|
||||||
$path = DOWNLOAD_PATH . DIRECTORY_SEPARATOR . $filename;
|
$path = DOWNLOAD_PATH . DIRECTORY_SEPARATOR . $filename;
|
||||||
default_shell()->executeCurlDownload($dist_url, $path, retries: $downloader->getRetry());
|
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
|
public function checkUpdate(string $name, array $config, ?string $old_version, ArtifactDownloader $downloader): CheckUpdateResult
|
||||||
|
|||||||
Reference in New Issue
Block a user