Add support to update-dependencies to not update the dependencies in a folder.

Folders can opt-in to not getting their dependencies updated by placing a '.noautoupdate' file in the folder of their project.json.
This commit is contained in:
Eric Erhardt 2016-05-25 09:11:54 -05:00
parent 6fe3f86140
commit c97648e684
2 changed files with 4 additions and 1 deletions

View file

@ -85,9 +85,12 @@ namespace Microsoft.DotNet.Scripts
{
List<DependencyInfo> dependencyInfos = c.GetDependencyInfos();
const string noUpdateFileName = ".noautoupdate";
IEnumerable<string> projectJsonFiles = Enumerable.Union(
Directory.GetFiles(Dirs.RepoRoot, "project.json", SearchOption.AllDirectories),
Directory.GetFiles(Path.Combine(Dirs.RepoRoot, @"src\dotnet\commands\dotnet-new"), "project.json.pretemplate", SearchOption.AllDirectories));
Directory.GetFiles(Path.Combine(Dirs.RepoRoot, @"src\dotnet\commands\dotnet-new"), "project.json.pretemplate", SearchOption.AllDirectories))
.Where(p => !File.Exists(Path.Combine(Path.GetDirectoryName(p), noUpdateFileName)));
JObject projectRoot;
foreach (string projectJsonFile in projectJsonFiles)