diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/AbpProCliCoreModule.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/AbpProCliCoreModule.cs index 2ea357ce..018cf430 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/AbpProCliCoreModule.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/AbpProCliCoreModule.cs @@ -58,7 +58,7 @@ public class AbpProCliCoreModule : AbpModule options.RepositoryId = "abp"; options.Templates = new List() { - new AbpProTemplateOptions("source", "source", "商业版本源码版本") + new AbpProTemplateOptions("abp", "abp", "商业版本源码版本") { ExcludeFiles = ".github,LICENSE,Readme.md", ReplaceSuffix = ".sln,.csproj,.cs,.cshtml,.json,.ci,.yml,.yaml,.nswag,.DotSettings,.env,Directory.Build.Lion.targets", @@ -67,7 +67,7 @@ public class AbpProCliCoreModule : AbpModule OldModuleName = "", }, - new AbpProTemplateOptions("nuget", "nuget", "商业版本nuget版本") + new AbpProTemplateOptions("abp-nuget", "abp-nuget", "商业版本nuget版本") { ExcludeFiles = ".github,LICENSE,Readme.md,aspnet-core,.idea,gateways,MyCompanyName.MyProjectName.Gateways.sln,MyCompanyName.MyProjectName.Gateways.sln.DotSettings.user", ReplaceSuffix = ".sln,.csproj,.cs,.cshtml,.json,.ci,.yml,.yaml,.nswag,.DotSettings,.env,Directory.Build.Lion.targets,.sln.DotSettings.user", @@ -76,7 +76,7 @@ public class AbpProCliCoreModule : AbpModule OldModuleName = "", }, - new AbpProTemplateOptions("nuget-gateways", "nuget", "商业版本nuget版本") + new AbpProTemplateOptions("abp-nuget-gateways", "abp-nuget", "商业版本nuget版本") { ExcludeFiles = ".github,LICENSE,Readme.md,aspnet-core,.idea,MyCompanyName.MyProjectName.sln,MyCompanyName.MyProjectName.sln.DotSettings.user", ReplaceSuffix = ".sln,.csproj,.cs,.cshtml,.json,.ci,.yml,.yaml,.nswag,.DotSettings,.env,Directory.Build.Lion.targets,.sln.DotSettings.user", diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Commands/CreateCommand.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Commands/CreateCommand.cs index f9a9323c..8de8ed0f 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Commands/CreateCommand.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Commands/CreateCommand.cs @@ -104,7 +104,7 @@ public class CreateCommand : IConsoleCommand, ITransientDependency // 解压源码 var extractPath = _sourceCodeManager.ExtractProjectZip(localFilePath, _cliOptions.RepositoryId, version); - var contentPath = templateOptions.Name == "source" ? Path.Combine(extractPath, _cliOptions.RepositoryId) : Path.Combine(extractPath, _cliOptions.RepositoryId, "templates", templateOptions.Name); + var contentPath = templateOptions.Name == _cliOptions.RepositoryId ? Path.Combine(extractPath, _cliOptions.RepositoryId) : Path.Combine(extractPath, _cliOptions.RepositoryId, "templates", templateOptions.Name); // 复制源码到输出目录 var destOutput = Path.Combine(CliPaths.Output, $"{companyName}-{projectName}-{version}"); diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Utils/DirectoryAndFileHelper.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Utils/DirectoryAndFileHelper.cs index b0fd7e5c..0f6e525b 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Utils/DirectoryAndFileHelper.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Utils/DirectoryAndFileHelper.cs @@ -1,6 +1,6 @@ namespace Lion.AbpPro.Cli.Utils; -public static class DirectoryAndFileHelper +public static class DirectoryAndFileHelper { /// /// 复制文件夹及文件 @@ -61,9 +61,9 @@ public static class DirectoryAndFileHelper CopyFolder(folder, dest); //构建目标路径,递归复制文件 } } - catch + catch (Exception ex) { - throw new UserFriendlyException("复制文件失败!"); + throw new UserFriendlyException("复制文件失败!" + ex.Message + ex.StackTrace); } }