PR feedback

This commit is contained in:
Eric Erhardt 2016-07-15 19:52:20 -05:00
parent a27d02eb66
commit eada6913c4
2 changed files with 15 additions and 10 deletions

View file

@ -64,13 +64,7 @@ namespace Microsoft.DotNet.Scripts
private static IDependencyUpdater CreateProjectJsonUpdater()
{
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.template", SearchOption.AllDirectories))
.Where(p => !File.Exists(Path.Combine(Path.GetDirectoryName(p), noUpdateFileName)) &&
!Path.GetDirectoryName(p).EndsWith("CSharp_Web", StringComparison.Ordinal));
IEnumerable<string> projectJsonFiles = GetProjectJsonsToUpdate();
return new ProjectJsonUpdater(projectJsonFiles)
{
@ -78,6 +72,17 @@ namespace Microsoft.DotNet.Scripts
};
}
private static IEnumerable<string> GetProjectJsonsToUpdate()
{
const string noUpdateFileName = ".noautoupdate";
return Enumerable.Union(
Directory.GetFiles(Dirs.RepoRoot, "project.json", SearchOption.AllDirectories),
Directory.GetFiles(Path.Combine(Dirs.RepoRoot, @"src\dotnet\commands\dotnet-new"), "project.json.template", SearchOption.AllDirectories))
.Where(p => !File.Exists(Path.Combine(Path.GetDirectoryName(p), noUpdateFileName)) &&
!Path.GetDirectoryName(p).EndsWith("CSharp_Web", StringComparison.Ordinal));
}
private static IDependencyUpdater CreateRegexUpdater(string repoRelativePath, string dependencyPropertyName, string packageId)
{
return new FileRegexPackageUpdater()