mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
Remove redundant suffix, add libc version suffix
This commit is contained in:
parent
c58ea0c3bd
commit
67afffeb96
@ -2,6 +2,5 @@
|
||||
"repo": "static-php/static-php-cli-hosted",
|
||||
"prefer-stable": true,
|
||||
"match-pattern-linux": "{name}-{arch}-{os}-{libc}-{libcver}.txz",
|
||||
"match-pattern": "{name}-{arch}-{os}.txz",
|
||||
"suffix": "txz"
|
||||
"match-pattern": "{name}-{arch}-{os}.txz"
|
||||
}
|
||||
@ -80,7 +80,7 @@ class PackLibCommand extends BuildCommand
|
||||
'{libcver}' => PHP_OS_FAMILY === 'Linux' ? (SystemUtil::getLibcVersionIfExists() ?? 'default') : 'default',
|
||||
];
|
||||
$filename = str_replace(array_keys($replace), array_values($replace), $filename);
|
||||
$filename = WORKING_DIR . '/dist/' . $filename . '.' . Config::getPreBuilt('suffix');
|
||||
$filename = WORKING_DIR . '/dist/' . $filename;
|
||||
f_passthru('tar -czf ' . $filename . ' -T ' . WORKING_DIR . '/packlib_files.txt');
|
||||
logger()->info('Pack library ' . $lib->getName() . ' to ' . $filename . ' complete.');
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace SPC\store;
|
||||
|
||||
use SPC\builder\linux\SystemUtil;
|
||||
use SPC\exception\DownloaderException;
|
||||
use SPC\exception\FileSystemException;
|
||||
use SPC\exception\RuntimeException;
|
||||
@ -596,7 +597,7 @@ class Downloader
|
||||
|
||||
public static function getPreBuiltLockName(string $source): string
|
||||
{
|
||||
return "{$source}-" . PHP_OS_FAMILY . '-' . getenv('GNU_ARCH') . '-' . (getenv('SPC_LIBC') ?: 'default');
|
||||
return "{$source}-" . PHP_OS_FAMILY . '-' . getenv('GNU_ARCH') . '-' . (getenv('SPC_LIBC') ?: 'default') . '-' . (SystemUtil::getLibcVersionIfExists() ?: 'default');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user