mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
docs(version): 补充 admin:version 命令的发布流程注释与帮助说明
This commit is contained in:
@@ -11,6 +11,19 @@ use think\console\Input;
|
|||||||
use think\console\input\Option;
|
use think\console\input\Option;
|
||||||
use think\console\Output;
|
use think\console\Output;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 版本管理与发布命令.
|
||||||
|
*
|
||||||
|
* 发布流程:
|
||||||
|
* 1. 修改 VERSION 常量为新版本号
|
||||||
|
* 2. php think admin:version --generate-comment
|
||||||
|
* → 从 git log 自动生成更新说明,输出到临时目录
|
||||||
|
* → 复制 commit_comment.php 中的数组内容到 COMMENT 常量
|
||||||
|
* 3. php think admin:version --push-tag
|
||||||
|
* → 创建 annotated tag 并推送到远程
|
||||||
|
* 4. [可选] php think admin:version --generate-release [--release-from-tag= vX.X.X]
|
||||||
|
* → 生成发布说明 Markdown,手动发布到目标平台
|
||||||
|
*/
|
||||||
class VersionBase extends Command
|
class VersionBase extends Command
|
||||||
{
|
{
|
||||||
public const VERSION = 'v2.1.4';
|
public const VERSION = 'v2.1.4';
|
||||||
@@ -59,7 +72,7 @@ class VersionBase extends Command
|
|||||||
->addOption('generate-release', null, Option::VALUE_NONE, '使用git命令生成发布说明文件')
|
->addOption('generate-release', null, Option::VALUE_NONE, '使用git命令生成发布说明文件')
|
||||||
->addOption('release-from-tag', null, Option::VALUE_OPTIONAL, '从指定版本开始生成说明文件')
|
->addOption('release-from-tag', null, Option::VALUE_OPTIONAL, '从指定版本开始生成说明文件')
|
||||||
->addOption('push-tag', null, Option::VALUE_NONE, '使用git命令生成tag并推送')
|
->addOption('push-tag', null, Option::VALUE_NONE, '使用git命令生成tag并推送')
|
||||||
->setDescription('查看当前ulthon_admin的版本号');
|
->setDescription('查看当前版本号。可选 --generate-comment 生成更新说明、--push-tag 打tag推送、--generate-release 生成发布说明');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function execute(Input $input, Output $output)
|
protected function execute(Input $input, Output $output)
|
||||||
|
|||||||
Reference in New Issue
Block a user