Touch solution file at the end of each scaffolding command.

--HG--
branch : dev
This commit is contained in:
Sebastien Ros
2010-07-20 15:08:45 -07:00
parent ee6ee571de
commit 2b72a69740

View File

@@ -69,7 +69,7 @@ namespace Orchard.DevTools.Commands {
projectFileText = projectFileText.Insert(projectFileText.LastIndexOf("</ItemGroup>"), itemGroupReference); projectFileText = projectFileText.Insert(projectFileText.LastIndexOf("</ItemGroup>"), itemGroupReference);
} }
File.WriteAllText(moduleCsProjPath, projectFileText); File.WriteAllText(moduleCsProjPath, projectFileText);
TouchSolution();
Context.Output.WriteLine(T("Data migration created successfully in Module {0}", extension.Name)); Context.Output.WriteLine(T("Data migration created successfully in Module {0}", extension.Name));
return; return;
} }
@@ -89,7 +89,7 @@ namespace Orchard.DevTools.Commands {
} }
IntegrateModule(moduleName); IntegrateModule(moduleName);
TouchSolution();
Context.Output.WriteLine(T("Module {0} created successfully", moduleName)); Context.Output.WriteLine(T("Module {0} created successfully", moduleName));
} }
@@ -128,6 +128,7 @@ namespace Orchard.DevTools.Commands {
} }
File.WriteAllText(moduleCsProjPath, projectFileText); File.WriteAllText(moduleCsProjPath, projectFileText);
Context.Output.WriteLine(T("Controller {0} created successfully in Module {1}", controllerName, moduleName)); Context.Output.WriteLine(T("Controller {0} created successfully in Module {1}", controllerName, moduleName));
TouchSolution();
return; return;
} }
} }
@@ -189,6 +190,12 @@ namespace Orchard.DevTools.Commands {
templateText = templateText.Replace("$$ModuleProjectGuid$$", projectGuid); templateText = templateText.Replace("$$ModuleProjectGuid$$", projectGuid);
File.WriteAllText(modulePath + "\\" + moduleName + ".csproj", templateText); File.WriteAllText(modulePath + "\\" + moduleName + ".csproj", templateText);
} }
private static void TouchSolution() {
string rootWebProjectPath = HostingEnvironment.MapPath("~/Orchard.Web.csproj");
string solutionPath = Directory.GetParent(rootWebProjectPath).Parent.FullName + "\\Orchard.sln";
File.SetLastWriteTime(solutionPath, DateTime.Now);
}
} }
} }