Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cli: move connectionstring step to customs #7277

Merged
merged 1 commit into from
Jan 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ public static ProjectBuildPipeline Build(ProjectBuildContext context)

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 ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public override IEnumerable<ProjectBuildPipelineStep> GetCustomSteps(ProjectBuil
RandomizeSslPorts(context, steps);
RandomizeStringEncryption(context, steps);
UpdateNuGetConfig(context, steps);
ChangeConnectionString(context, steps);
CleanupFolderHierarchy(context, steps);

return steps;
Expand Down Expand Up @@ -286,6 +287,14 @@ private static void RemoveMigrations(ProjectBuildContext context, List<ProjectBu
}
}

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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public override IEnumerable<ProjectBuildPipelineStep> GetCustomSteps(ProjectBuil
DeleteUnrelatedProjects(context, steps);
RandomizeSslPorts(context, steps);
UpdateNuGetConfig(context, steps);
ChangeConnectionString(context, steps);
CleanupFolderHierarchy(context, steps);

return steps;
Expand Down Expand Up @@ -78,6 +79,14 @@ private static void UpdateNuGetConfig(ProjectBuildContext context, List<ProjectB
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/", "/"));
Expand Down