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()

View file

@ -34,9 +34,9 @@ if($LASTEXITCODE -ne 0) { throw "Failed to install stage0" }
# Put the stage0 on the path
$env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH"
# Restore the build_projects
Write-Host "Restoring Build projects..."
pushd "$RepoRoot\build_projects"
# Restore the app
Write-Host "Restoring update-dependencies..."
pushd "$AppPath"
dotnet restore
if($LASTEXITCODE -ne 0) { throw "Failed to restore" }
popd