mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Touch solution file at the end of each scaffolding command.
--HG-- branch : dev
This commit is contained in:
parent
ee6ee571de
commit
2b72a69740
@ -69,7 +69,7 @@ namespace Orchard.DevTools.Commands {
|
||||
projectFileText = projectFileText.Insert(projectFileText.LastIndexOf("</ItemGroup>"), itemGroupReference);
|
||||
}
|
||||
File.WriteAllText(moduleCsProjPath, projectFileText);
|
||||
|
||||
TouchSolution();
|
||||
Context.Output.WriteLine(T("Data migration created successfully in Module {0}", extension.Name));
|
||||
return;
|
||||
}
|
||||
@ -89,7 +89,7 @@ namespace Orchard.DevTools.Commands {
|
||||
}
|
||||
|
||||
IntegrateModule(moduleName);
|
||||
|
||||
TouchSolution();
|
||||
Context.Output.WriteLine(T("Module {0} created successfully", moduleName));
|
||||
}
|
||||
|
||||
@ -128,6 +128,7 @@ namespace Orchard.DevTools.Commands {
|
||||
}
|
||||
File.WriteAllText(moduleCsProjPath, projectFileText);
|
||||
Context.Output.WriteLine(T("Controller {0} created successfully in Module {1}", controllerName, moduleName));
|
||||
TouchSolution();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -189,6 +190,12 @@ namespace Orchard.DevTools.Commands {
|
||||
templateText = templateText.Replace("$$ModuleProjectGuid$$", projectGuid);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user