mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
为基于框架的产品预留更新机制;
This commit is contained in:
@@ -12,11 +12,15 @@ use think\console\Output;
|
||||
|
||||
class UpdateBase extends Command
|
||||
{
|
||||
|
||||
public const REPO = null;
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
// 指令配置
|
||||
$this->setName('admin:update')
|
||||
->addOption('reinstall', null, Option::VALUE_NONE, '重装版本')
|
||||
->addOption('update-ulthon', null, Option::VALUE_NONE, '重装版本')
|
||||
->setDescription('the admin:update command');
|
||||
}
|
||||
|
||||
@@ -25,7 +29,13 @@ class UpdateBase extends Command
|
||||
// 指令输出
|
||||
$output->writeln('admin:update');
|
||||
|
||||
$update_service = new AdminUpdateService();
|
||||
$repo = static::REPO;
|
||||
|
||||
if($input->hasOption('update-ulthon')){
|
||||
$repo = null;
|
||||
}
|
||||
|
||||
$update_service = new AdminUpdateService($repo);
|
||||
$update_service->input = $input;
|
||||
$update_service->output = $output;
|
||||
$update_service->update();
|
||||
|
||||
Reference in New Issue
Block a user