修复获取版本错误

This commit is contained in:
augushong
2024-10-14 18:42:15 +08:00
parent 9e0535ef6a
commit 04028a4809

View File

@@ -12,17 +12,14 @@ use think\console\Output;
class VersionBase extends Command
{
public const VERSION = 'v2.0.104';
public const VERSION = 'v2.0.105';
public const PRODUCT_VERSION = '';
public const LAYUI_VERSION = '2.8.17';
public const COMMENT = [
'新增支持产品二次更新机制',
'优化定时器逻辑',
'新增表单提交按钮不关闭的参数',
'优化curd生成迁移文件代码不生成本地文件',
'修复获取版本错误',
'发布新版本',
];
@@ -38,16 +35,16 @@ class VersionBase extends Command
{
// 指令输出
if (!empty(static::PRODUCT_VERSION)) {
$output->info('当前版本号为:' . $this::PRODUCT_VERSION);
$output->info('当前版本号为:' . static::PRODUCT_VERSION);
}
$output->info('当前ulthon_admin版本号为' . $this::VERSION);
$output->info('当前Layui版本号为' . $this::LAYUI_VERSION);
$output->info('当前ulthon_admin版本号为' . static::VERSION);
$output->info('当前Layui版本号为' . static::LAYUI_VERSION);
$output->info('当前ThinkPHP版本号为' . ThinkApp::VERSION);
$output->writeln('当前的修改说明:');
$output->writeln('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>');
foreach ($this::COMMENT as $comment) {
foreach (static::COMMENT as $comment) {
$output->info($comment);
}
$output->writeln('<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<');
@@ -60,11 +57,11 @@ class VersionBase extends Command
if ($is_push_tag) {
$output->writeln('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>');
$version = $this::VERSION;
$version = static::VERSION;
if(!empty(static::PRODUCT_VERSION)) {
$version = static::PRODUCT_VERSION;
}
$comment = implode(';', $this::COMMENT);
$comment = implode(';', static::COMMENT);
$output->info('生成标签:' . $version);
$output->info('标签描述:' . $comment);
exec("git tag -a $version -m \"$comment\"");