feat(update): 新增 admin:update --fetch-only 纯拉取模式

This commit is contained in:
augushong
2026-08-08 19:09:21 +08:00
parent ad96755ff5
commit 0e1df3852d
2 changed files with 74 additions and 2 deletions

View File

@@ -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();
}