fix #332 by using dnu packages add
This commit is contained in:
parent
b33335a144
commit
3b57c74921
|
|
@ -1,20 +0,0 @@
|
||||||
@{/*
|
|
||||||
|
|
||||||
dotnet-publish
|
|
||||||
Builds project. Downloads and executes dotnet sdk tools.
|
|
||||||
|
|
||||||
sourcePackagesDir=''
|
|
||||||
Required. Path to packages to install (skips symbol packages)
|
|
||||||
|
|
||||||
targetPackagesDir=''
|
|
||||||
Optional. Path to publish packages.
|
|
||||||
*/}
|
|
||||||
|
|
||||||
default targetPackagesDir=''
|
|
||||||
|
|
||||||
@{
|
|
||||||
var packages = Directory.EnumerateFiles(sourcePackagesDir, "*.nupkg")
|
|
||||||
.Where(p => !p.EndsWith(".symbols.nupkg"));
|
|
||||||
}
|
|
||||||
|
|
||||||
dotnet command='packages add ${package} ${targetPackagesDir}' each='var package in packages'
|
|
||||||
|
|
@ -162,7 +162,7 @@ default NUGET_FEED = 'https://api.nuget.org/v3/index.json'
|
||||||
}
|
}
|
||||||
|
|
||||||
#nuget-install target='install' if='Directory.Exists("src")' description='Install NuGet packages to local repo'
|
#nuget-install target='install' if='Directory.Exists("src")' description='Install NuGet packages to local repo'
|
||||||
dotnet-publish sourcePackagesDir='${BUILD_DIR}' targetPackagesDir='${E("PACKAGES_PUBLISH_DIR")}'
|
nuget-packages-add sourcePackagesDir='${BUILD_DIR}' targetPackagesDir='${E("PACKAGES_PUBLISH_DIR")}'
|
||||||
nuget-resilient-publish sourcePackagesDir='${BUILD_DIR}' nugetFeed='${E("NUGET_PUBLISH_FEED")}' if='!string.IsNullOrEmpty(E("NUGET_PUBLISH_FEED"))'
|
nuget-resilient-publish sourcePackagesDir='${BUILD_DIR}' nugetFeed='${E("NUGET_PUBLISH_FEED")}' if='!string.IsNullOrEmpty(E("NUGET_PUBLISH_FEED"))'
|
||||||
|
|
||||||
#xunit-test target='test' if='Directory.Exists("test")'
|
#xunit-test target='test' if='Directory.Exists("test")'
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
@{/*
|
||||||
|
|
||||||
|
nuget-packages-add
|
||||||
|
Installs packages to a NuGet v3 directory structure
|
||||||
|
|
||||||
|
sourcePackagesDir=''
|
||||||
|
Required. Path to packages to install (skips symbol packages)
|
||||||
|
|
||||||
|
targetPackagesDir=''
|
||||||
|
Optional. Path to publish packages.
|
||||||
|
*/}
|
||||||
|
|
||||||
|
default targetPackagesDir=''
|
||||||
|
|
||||||
|
@{
|
||||||
|
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'
|
||||||
Loading…
Reference in New Issue