Browse Source
Merge pull request #7277 from abpframework/cli-move-connectionstring-step-to-customs
Cli: move connectionstring step to customs
pull/7288/head
Halil İbrahim Kalkan
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
18 additions and
6 deletions
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/TemplateProjectBuildPipelineBuilder.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplateBase.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/Module/ModuleTemplateBase.cs
|
|
|
@ -17,12 +17,6 @@ namespace Volo.Abp.Cli.ProjectBuilding.Building |
|
|
|
|
|
|
|
pipeline.Steps.Add(new ProjectReferenceReplaceStep()); |
|
|
|
pipeline.Steps.Add(new TemplateCodeDeleteStep()); |
|
|
|
|
|
|
|
if (context.BuildArgs.ConnectionString != null) |
|
|
|
{ |
|
|
|
pipeline.Steps.Add(new ConnectionStringChangeStep()); |
|
|
|
} |
|
|
|
|
|
|
|
pipeline.Steps.Add(new SolutionRenameStep()); |
|
|
|
|
|
|
|
if (context.Template.Name == AppProTemplate.TemplateName || |
|
|
|
|
|
|
|
@ -32,6 +32,7 @@ namespace Volo.Abp.Cli.ProjectBuilding.Templates.App |
|
|
|
RandomizeSslPorts(context, steps); |
|
|
|
RandomizeStringEncryption(context, steps); |
|
|
|
UpdateNuGetConfig(context, steps); |
|
|
|
ChangeConnectionString(context, steps); |
|
|
|
CleanupFolderHierarchy(context, steps); |
|
|
|
|
|
|
|
return steps; |
|
|
|
@ -286,6 +287,14 @@ namespace Volo.Abp.Cli.ProjectBuilding.Templates.App |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private static void ChangeConnectionString(ProjectBuildContext context, List<ProjectBuildPipelineStep> steps) |
|
|
|
{ |
|
|
|
if (context.BuildArgs.ConnectionString != null) |
|
|
|
{ |
|
|
|
steps.Add(new ConnectionStringChangeStep()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private static void CleanupFolderHierarchy(ProjectBuildContext context, List<ProjectBuildPipelineStep> steps) |
|
|
|
{ |
|
|
|
if (context.BuildArgs.UiFramework == UiFramework.Mvc && context.BuildArgs.MobileApp == MobileApp.None) |
|
|
|
|
|
|
|
@ -19,6 +19,7 @@ namespace Volo.Abp.Cli.ProjectBuilding.Templates.Module |
|
|
|
DeleteUnrelatedProjects(context, steps); |
|
|
|
RandomizeSslPorts(context, steps); |
|
|
|
UpdateNuGetConfig(context, steps); |
|
|
|
ChangeConnectionString(context, steps); |
|
|
|
CleanupFolderHierarchy(context, steps); |
|
|
|
|
|
|
|
return steps; |
|
|
|
@ -78,6 +79,14 @@ namespace Volo.Abp.Cli.ProjectBuilding.Templates.Module |
|
|
|
steps.Add(new UpdateNuGetConfigStep("/aspnet-core/NuGet.Config")); |
|
|
|
} |
|
|
|
|
|
|
|
private static void ChangeConnectionString(ProjectBuildContext context, List<ProjectBuildPipelineStep> steps) |
|
|
|
{ |
|
|
|
if (context.BuildArgs.ConnectionString != null) |
|
|
|
{ |
|
|
|
steps.Add(new ConnectionStringChangeStep()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void CleanupFolderHierarchy(ProjectBuildContext context, List<ProjectBuildPipelineStep> steps) |
|
|
|
{ |
|
|
|
steps.Add(new MoveFolderStep("/aspnet-core/", "/")); |
|
|
|
|