feat: 版本说明支持生成markdown文件

This commit is contained in:
augushong
2025-03-11 10:59:19 +08:00
parent 4aaa1c08c4
commit 3ab1fa500a

View File

@@ -22,6 +22,7 @@ class VersionBase extends Command
public const COMMENT = [ public const COMMENT = [
'版本更新说明:', '版本更新说明:',
'【新功能】', '【新功能】',
'- 版本命令支持生成说明文件',
'- 优化首页的最新修改样式', '- 优化首页的最新修改样式',
'- 实现token认证机制', '- 实现token认证机制',
'- 实现后台请求兼容接口的模式', '- 实现后台请求兼容接口的模式',
@@ -182,6 +183,10 @@ class VersionBase extends Command
$comment_arr_code = implode("\n", $comment_arr); $comment_arr_code = implode("\n", $comment_arr);
$tmp_comment_file = PathTools::tempBuildPath('commit_comment.php'); $tmp_comment_file = PathTools::tempBuildPath('commit_comment.php');
file_put_contents($tmp_comment_file, "<?php\nreturn [\n" . $comment_arr_code . "\n];"); file_put_contents($tmp_comment_file, "<?php\nreturn [\n" . $comment_arr_code . "\n];");
$this->output->info('已生成版本更新说明' . $tmp_comment_file); $this->output->info('已生成版本更新代码' . $tmp_comment_file);
$tmp_comment_markdown_file = PathTools::tempBuildPath('commit_comment.md');
file_put_contents($tmp_comment_markdown_file, $comment);
$this->output->info('已生成版本更新Markdown'. $tmp_comment_markdown_file);
} }
} }