mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
remove old file deletions
This commit is contained in:
parent
32dc5d3cdb
commit
ba6ed137c6
@ -162,21 +162,6 @@ class BuildPHPCommand extends BuildCommand
|
||||
$indent_texts['UPX Pack'] = 'enabled';
|
||||
}
|
||||
|
||||
try {
|
||||
$cleanPhpSrc = $builder->getPHPVersion() !== $builder->getPHPVersionFromArchive();
|
||||
} catch (RuntimeException|WrongUsageException) {
|
||||
$cleanPhpSrc = true;
|
||||
}
|
||||
if ($cleanPhpSrc) {
|
||||
logger()->info('Cleaning previous php build due to mismatching versions...');
|
||||
FileSystem::removeDir(SOURCE_PATH . '/php-src');
|
||||
FileSystem::removeDir(BUILD_MODULES_PATH);
|
||||
$binFiles = glob(BUILD_BIN_PATH . '/php*');
|
||||
$libFiles = glob(BUILD_LIB_PATH . '/libphp*');
|
||||
foreach ([...$binFiles, ...$libFiles] as $file) {
|
||||
unlink($file);
|
||||
}
|
||||
}
|
||||
$ver = $builder->getPHPVersionFromArchive() ?: $builder->getPHPVersion();
|
||||
$indent_texts['PHP Version'] = $ver;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user