Browse Source

feat: 调整cli

main-cli
Hanpaopao 1 year ago
parent
commit
d33f5c07f6
  1. 8
      aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/AbpProCliCoreModule.cs
  2. 2
      aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Commands/CreateCommand.cs

8
aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/AbpProCliCoreModule.cs

@ -58,16 +58,16 @@ public class AbpProCliCoreModule : AbpModule
options.RepositoryId = "abp";
options.Templates = new List<AbpProTemplateOptions>()
{
new AbpProTemplateOptions("abp", "abp", "商业版本源码版本")
new AbpProTemplateOptions("pro", "pro", "商业版本源码版本")
{
ExcludeFiles = ".github,LICENSE,Readme.md",
ExcludeFiles = ".github,LICENSE,Readme.md,templates",
ReplaceSuffix = ".sln,.csproj,.cs,.cshtml,.json,.ci,.yml,.yaml,.nswag,.DotSettings,.env,Directory.Build.Lion.targets",
OldCompanyName = "Lion",
OldProjectName = "AbpPro",
OldModuleName = "",
},
new AbpProTemplateOptions("abp-nuget", "abp-nuget", "商业版本nuget版本")
new AbpProTemplateOptions("pro-nuget", "pro-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("abp-nuget-gateways", "abp-nuget", "商业版本nuget版本")
new AbpProTemplateOptions("pro-nuget-gateways", "pro-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",

2
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 == _cliOptions.RepositoryId ? Path.Combine(extractPath, _cliOptions.RepositoryId) : Path.Combine(extractPath, _cliOptions.RepositoryId, "templates", templateOptions.Name);
var contentPath = templateOptions.Name == "pro" ? Path.Combine(extractPath, _cliOptions.RepositoryId) : Path.Combine(extractPath, _cliOptions.RepositoryId, "templates", templateOptions.Name);
// 复制源码到输出目录
var destOutput = Path.Combine(CliPaths.Output, $"{companyName}-{projectName}-{version}");

Loading…
Cancel
Save