修改打包命令
This commit is contained in:
parent
bcdf6cd9c7
commit
b9c156e5a7
@ -9,24 +9,30 @@ use think\console\Input;
|
|||||||
use think\console\input\Argument;
|
use think\console\input\Argument;
|
||||||
use think\console\Output;
|
use think\console\Output;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打包模块
|
||||||
|
*
|
||||||
|
* Class CompressPackageCommand
|
||||||
|
* @package catcher\command\Tools
|
||||||
|
*/
|
||||||
class CompressPackageCommand extends Command
|
class CompressPackageCommand extends Command
|
||||||
{
|
{
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
// 指令配置
|
// 指令配置
|
||||||
$this->setName('package:zip')
|
$this->setName('catch:unpack ')
|
||||||
->addArgument('package', Argument::REQUIRED, 'package name')
|
->addArgument('module', Argument::REQUIRED, 'module name')
|
||||||
->setDescription('compress package to zip');
|
->setDescription('compress module to zip');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function execute(Input $input, Output $output)
|
protected function execute(Input $input, Output $output)
|
||||||
{
|
{
|
||||||
$package = $this->input->getArgument('package');
|
$package = $this->input->getArgument('module');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
(new Compress())->moduleToZip($package);
|
(new Compress())->moduleToZip($package);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$output->error($e->getMessage());
|
exit($output->error($e->getMessage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
$output->info($package . ' zip successfully~');
|
$output->info($package . ' zip successfully~');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user