mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-05 17:42:49 +08:00
feat(update): 新增 --keep-repo 参数,dry-run 模式下保留上游克隆目录便于对比
This commit is contained in:
@@ -28,6 +28,7 @@ class UpdateBase extends Command
|
||||
->addOption('optional-conflict', null, Option::VALUE_OPTIONAL, '可选文件冲突处理策略: skip|overwrite|ask')
|
||||
->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, '预览模式下保留上游克隆目录,便于手动对比跳过的文件')
|
||||
->setDescription('更新系统代码');
|
||||
}
|
||||
|
||||
@@ -49,6 +50,7 @@ class UpdateBase extends Command
|
||||
$update_service->optionalConflict = $input->getOption('optional-conflict') ?: null;
|
||||
$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->update();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user