Updating config to create release NuGet.config and phantom merge as part of update-release

This commit is contained in:
Pranav K 2014-11-06 10:08:09 -08:00
parent 374a0ec055
commit 38afedb080
2 changed files with 16 additions and 11 deletions

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetrelease/api/v2" />
<add key="NuGet.org" value="https://nuget.org/api/v2/" />
</packageSources>
</configuration>

View File

@ -142,18 +142,16 @@ var buildTarget = "compile"
foreach (var repo in GetAllRepos())
{
CloneOrUpdate(repo);
try
{
GitCommand(repo, "checkout release");
}
catch
{
// If the release branch does not exist, create a new branch and reset origin/dev to it.
GitCommand(repo, "checkout origin/dev -b release");
}
GitCommand(repo, "merge origin/dev");
GitCommand(repo, "checkout origin/dev -B release");
File.Copy(Path.Combine("build-template", "NuGet.release.config"),
Path.Combine(repo, "NuGet.config"),
overwrite: true);
GitCommand(repo, "commit -am \"Updating to release NuGet.config\"");
GitCommand(repo, "push origin release");
GitCommand(repo, "checkout origin/dev -B dev");
GitCommand(repo, "merge release -s ours");
GitCommand(repo, "push origin dev");
}
}