Make build install go directly to packages cache

This commit is contained in:
David Fowler 2015-01-21 01:36:22 -08:00 committed by Pranav K
parent 42a3fce46a
commit 466a710a16
2 changed files with 18 additions and 2 deletions

View File

@ -72,8 +72,8 @@ default Configuration='${E("Configuration")}'
copy sourceDir='${Path.GetDirectoryName(project)}' include='bin/**/' outputDir='${Path.Combine(BUILD_DIR, Path.GetFileNameWithoutExtension(project))}' overwrite='${true}' each='var project in nativeProjects'
#nuget-install target='install' description='Copy NuGet packages to local repo'
nuget-local-publish sourcePackagesDir='${BUILD_DIR}'
#nuget-install target='install' description='Install NuGet packages to local repo'
kpm-local-publish sourcePackagesDir='${BUILD_DIR}'
#xunit-test target='test' if='Directory.Exists("test")'
k-test each='var projectFile in Files.Include("test/**/project.json")'

View File

@ -0,0 +1,16 @@
@{/*
k-local-publish
Builds project. Downloads and executes k sdk tools.
sourcePackagesDir=''
Required. Path to packages to install (skips symbol packages)
*/}
@{
var packages = Directory.EnumerateFiles(sourcePackagesDir, "*.nupkg")
.Where(p => !p.EndsWith(".symbols.nupkg"));
}
exec program='cmd' commandline='/C kpm packages add ${package}' if='!IsMono' each='var package in packages'
exec program='kpm' commandline='packages add ${package}' if='IsMono' each='var package in packages'