feat(update): 支持更新到 ulthon_admin 的 master 分支

新增 `--update-master` 选项,允许用户选择更新到远程仓库的 master 分支,而非默认的最新标签版本。这为需要最新开发版代码的场景提供了灵活性。
This commit is contained in:
augushong
2026-05-07 22:59:19 +08:00
parent 2663bf4a5a
commit 37c8142721
2 changed files with 49 additions and 30 deletions

View File

@@ -23,6 +23,7 @@ class UpdateBase extends Command
$this->setName('admin:update')
->addOption('reinstall', null, Option::VALUE_NONE, '重装版本')
->addOption('update-ulthon', null, Option::VALUE_NONE, '更新 ulthon_admin')
->addOption('update-master', null, Option::VALUE_NONE, '更新 ulthon_admin 的 master 分支')
->setDescription('更新系统代码');
}
@@ -33,7 +34,7 @@ class UpdateBase extends Command
$repo = static::REPO;
if($input->hasOption('update-ulthon')){
if ((bool)$input->getOption('update-ulthon')) {
$repo = 'ulthon_admin';
}