feat: 支持版本号

This commit is contained in:
橙子
2024-11-06 00:05:29 +08:00
parent 49f1d1a8fa
commit ed5c20c612
4 changed files with 9 additions and 19 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Extensions.CommandLineUtils;
@@ -24,7 +25,7 @@ namespace Yi.Abp.Tool
private void InitCommand()
{
Application.HelpOption("-h|--help");
Application.VersionOption("-v|--versions","1.0.0");
Application.VersionOption("-v|--versions", Assembly.GetExecutingAssembly().GetName().Version.ToString());
foreach (var command in _commands)
{
CommandLineApplication childrenCommandLineApplication = new CommandLineApplication(true)