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