private TemplatePlan CreateBaseTemplatePlan(BuildCake buildCakeTask, bool shouldOverwrite) { TemplatePlan templatePlan = new TemplatePlan(); templatePlan.AddStep(new CreateFileFromTemplate(templateFileProvider, "build\\build.ps1", "build\\build.ps1", shouldOverwrite)); templatePlan.AddStep(buildCakeTask); return(templatePlan); }
public TemplatePlan CreateTemplatePlan(InitOptions initOptions) { var buildCakeTask = new BuildCake(scriptTaskEvaluator, initOptions); var templatePlan = this.CreateBaseTemplatePlan(buildCakeTask, initOptions.Overwrite); var solutionInfo = PrepareSolutionInfo(initOptions); var projects = FindProjects(solutionInfo); var projectTasks = CreateProjectLevelTasks(solutionInfo, projects); var solutionTasks = CreateSolutionLevelTasks(solutionInfo); var tasks = new List <ITask>(); tasks.AddRange(solutionTasks); tasks.AddRange(projectTasks); buildCakeTask.AddScriptTasks(tasks.OrderBy(task => task.Type.TaskOrder)); Log.DecreaseIndent(); return(templatePlan); }