mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 21:04:52 +08:00
fix --with-clean to make it work
This commit is contained in:
parent
30213da70a
commit
c1e9cd2ea3
@ -7,6 +7,7 @@ namespace SPC\command;
|
|||||||
use SPC\builder\BuilderProvider;
|
use SPC\builder\BuilderProvider;
|
||||||
use SPC\exception\ExceptionHandler;
|
use SPC\exception\ExceptionHandler;
|
||||||
use SPC\exception\WrongUsageException;
|
use SPC\exception\WrongUsageException;
|
||||||
|
use SPC\store\FileSystem;
|
||||||
use SPC\store\SourcePatcher;
|
use SPC\store\SourcePatcher;
|
||||||
use SPC\util\DependencyUtil;
|
use SPC\util\DependencyUtil;
|
||||||
use SPC\util\LicenseDumper;
|
use SPC\util\LicenseDumper;
|
||||||
@ -70,6 +71,10 @@ class BuildCliCommand extends BuildCommand
|
|||||||
logger()->warning('some extensions will be enabled due to dependencies: ' . implode(',', $not_included));
|
logger()->warning('some extensions will be enabled due to dependencies: ' . implode(',', $not_included));
|
||||||
}
|
}
|
||||||
sleep(2);
|
sleep(2);
|
||||||
|
if ($this->input->getOption('with-clean')) {
|
||||||
|
logger()->info('Cleaning source dir...');
|
||||||
|
FileSystem::removeDir(SOURCE_PATH);
|
||||||
|
}
|
||||||
// compile libraries
|
// compile libraries
|
||||||
$builder->buildLibs($libraries);
|
$builder->buildLibs($libraries);
|
||||||
// check extensions
|
// check extensions
|
||||||
|
|||||||
@ -28,7 +28,7 @@ abstract class BuildCommand extends BaseCommand
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->addOption('with-clean', null, null, 'fresh build, `make clean` before `make`');
|
$this->addOption('with-clean', null, null, 'fresh build, remove `source` dir before `make`');
|
||||||
$this->addOption('bloat', null, null, 'add all libraries into binary');
|
$this->addOption('bloat', null, null, 'add all libraries into binary');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user