diff --git a/Yi.Abp.Net8/tool/Yi.Abp.Tool/CommandInvoker.cs b/Yi.Abp.Net8/tool/Yi.Abp.Tool/CommandInvoker.cs index affa99d6..830e7b54 100644 --- a/Yi.Abp.Net8/tool/Yi.Abp.Tool/CommandInvoker.cs +++ b/Yi.Abp.Net8/tool/Yi.Abp.Tool/CommandInvoker.cs @@ -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) diff --git a/Yi.Abp.Net8/tool/Yi.Abp.Tool/Commands/NewCommand.cs b/Yi.Abp.Net8/tool/Yi.Abp.Tool/Commands/NewCommand.cs index 4ef5b6cc..d7ef5acd 100644 --- a/Yi.Abp.Net8/tool/Yi.Abp.Tool/Commands/NewCommand.cs +++ b/Yi.Abp.Net8/tool/Yi.Abp.Tool/Commands/NewCommand.cs @@ -79,14 +79,13 @@ namespace Yi.Abp.Tool.Commands { var moduleName = moduleNameArgument.Value.ToLower().Replace(".", "-"); - unzipDirPath = Path.Combine(path, unzipDirPath); + unzipDirPath = Path.Combine(path, moduleName); if (Directory.Exists(unzipDirPath)) { throw new UserFriendlyException($"文件夹[{unzipDirPath}]已存在,请删除后重试"); } Directory.CreateDirectory(unzipDirPath); - unzipDirPath = moduleName; } #endregion diff --git a/Yi.Abp.Net8/tool/Yi.Abp.Tool/Program.cs b/Yi.Abp.Net8/tool/Yi.Abp.Tool/Program.cs index caea4edf..5918ae8a 100644 --- a/Yi.Abp.Net8/tool/Yi.Abp.Tool/Program.cs +++ b/Yi.Abp.Net8/tool/Yi.Abp.Tool/Program.cs @@ -1,35 +1,25 @@ -using Microsoft.Extensions.DependencyInjection; +using System.Reflection; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Yi.Abp.Tool; - class Program { static async Task Main(string[] args) { #if DEBUG - //args = ["v"]; - //args = ["-v"]; - //args = ["h"]; - //args = ["-h"]; - //args = []; - //args = ["12312"]; - //args = ["new", "Acme.Book", "-t", "module", "-csf"]; - //args = ["new", "Acme.Book", "-t", "module"]; - //args = ["add-module", "Acme.Demo", "-s", "D:\\code\\csharp\\source\\Yi\\Yi.Abp.Net8", "-modulePath", "D:\\code\\csharp\\source\\Yi\\Yi.Abp.Net8\\module\\acme-demo"]; - // args = ["clear", "-path", "D:\\code\\csharp\\source\\Yi\\Yi.Abp.Net8\\src"]; - + //帮助 //args = ["-h"]; //版本 - // args = ["-v"]; + args = ["-v"]; //清理 // args = ["clear"]; //创建模块 - args = ["new","oooo", "-t","module","-p","D:\\temp","-csf"]; + //args = ["new","oooo", "-t","module","-p","D:\\temp","-csf"]; //添加模块 //args = ["add-module", "kkk"]; diff --git a/Yi.Abp.Net8/tool/Yi.Abp.Tool/Yi.Abp.Tool.csproj b/Yi.Abp.Net8/tool/Yi.Abp.Tool/Yi.Abp.Tool.csproj index 0d28c1fd..5cf5f397 100644 --- a/Yi.Abp.Net8/tool/Yi.Abp.Tool/Yi.Abp.Tool.csproj +++ b/Yi.Abp.Net8/tool/Yi.Abp.Tool/Yi.Abp.Tool.csproj @@ -5,7 +5,7 @@ net8.0 enable enable - 1.1.0 + 2.0.0 橙子老哥 yi-framework框架配套工具 https://ccnetcore.com