mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-09-04 07:01:37 +08:00
feat(update): 新增 admin:update --fetch-only 纯拉取模式
This commit is contained in:
@@ -29,6 +29,7 @@ class UpdateBase extends Command
|
||||
->addOption('force-conflict', null, Option::VALUE_OPTIONAL, '强制文件冲突处理策略: overwrite|skip|ask')
|
||||
->addOption('show', null, Option::VALUE_OPTIONAL, '变更输出范围: all|conflict')
|
||||
->addOption('keep-repo', null, Option::VALUE_NONE, '预览模式下保留上游克隆目录,便于手动对比跳过的文件')
|
||||
->addOption('fetch-only', null, Option::VALUE_NONE, '仅拉取上游代码到本地,不执行对比和更新')
|
||||
->setDescription('更新系统代码');
|
||||
}
|
||||
|
||||
@@ -51,6 +52,7 @@ class UpdateBase extends Command
|
||||
$update_service->forceConflict = $input->getOption('force-conflict') ?: null;
|
||||
$update_service->showScope = $input->getOption('show') ?: null;
|
||||
$update_service->keepRepo = (bool)$input->getOption('keep-repo');
|
||||
$update_service->fetchOnly = (bool)$input->getOption('fetch-only');
|
||||
|
||||
$update_service->update();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user