action update module add
This commit is contained in:
@ -64,4 +64,18 @@ class ModuleController extends ConsoleController
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function actionUpdateModule(): void
|
||||
{
|
||||
if (!isset($this->argv['path'])) {
|
||||
throw new \Exception('Missing module path "--path" specified');
|
||||
}
|
||||
if (file_exists(ROOT_DIR . $this->argv['path'])) {
|
||||
$moduleService = new ModuleService();
|
||||
$moduleService->updateModule($this->argv['path']);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -25,5 +25,6 @@ App::$collector->group(["prefix" => "module"], callback: function (RouteCollecto
|
||||
App::$collector->console('install', [\kernel\console\controllers\ModuleController::class, 'actionInstallModule']);
|
||||
App::$collector->console('uninstall', [\kernel\console\controllers\ModuleController::class, 'actionUninstallModule']);
|
||||
App::$collector->console('pack', [\kernel\console\controllers\ModuleController::class, 'actionPackModule']);
|
||||
App::$collector->console('update', [\kernel\console\controllers\ModuleController::class, 'actionUpdateModule']);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user