Use nuget add instead of dnu packages add

This commit is contained in:
Victor Hurdugaci 2015-12-16 15:15:43 -08:00
parent e5f42498ac
commit dfb033e51c
2 changed files with 14 additions and 8 deletions

View File

@ -13,11 +13,17 @@ targetPackagesDir=''
default targetPackagesDir=''
@{
var packages = Directory.EnumerateFiles(sourcePackagesDir, "*.nupkg")
.Where(p => !p.EndsWith(".symbols.nupkg"));
var packages = Directory.EnumerateFiles(sourcePackagesDir, "*.nupkg")
.Where(p => !p.EndsWith(".symbols.nupkg"));
}
-// Temporarily use dnu until we have a nuget command
exec program='cmd' commandline='/c dnu packages add ${package} ${targetPackagesDir}' each='var package in packages' if='!IsLinux'
exec program='dnu' commandline='packages add ${package} ${targetPackagesDir}' each='var package in packages' if='IsLinux'
var nugetExePath = Environment.GetEnvironmentVariable("PUSH_NUGET_EXE");
if (string.IsNullOrEmpty(nugetExePath))
{
nugetExePath = ".build/NuGet.exe";
}
Parallel.ForEach(packages, package =>
{
ExecClr(nugetExePath, "add " + package + " -source " + targetPackagesDir + " -expand");
});
}

View File

@ -28,7 +28,7 @@ set nugetArgs='${nugetArgs} ${extra}' if='!string.IsNullOrEmpty(extra)'
var nugetExePath = Environment.GetEnvironmentVariable("PUSH_NUGET_EXE");
if (string.IsNullOrEmpty(nugetExePath))
{
nugetExePath = ".nuget/NuGet.exe";
nugetExePath = ".build/NuGet.exe";
}
Parallel.ForEach(packages, package =>