diff --git a/KoreBuild-dotnet/build/_dotnet-publish.shade b/KoreBuild-dotnet/build/_dotnet-publish.shade deleted file mode 100644 index 93df9b240b..0000000000 --- a/KoreBuild-dotnet/build/_dotnet-publish.shade +++ /dev/null @@ -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' diff --git a/KoreBuild-dotnet/build/_k-standard-goals.shade b/KoreBuild-dotnet/build/_k-standard-goals.shade index 1d537df3f7..0068b8c49d 100644 --- a/KoreBuild-dotnet/build/_k-standard-goals.shade +++ b/KoreBuild-dotnet/build/_k-standard-goals.shade @@ -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' - 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"))' #xunit-test target='test' if='Directory.Exists("test")' diff --git a/KoreBuild-dotnet/build/_nuget-packages-add.shade b/KoreBuild-dotnet/build/_nuget-packages-add.shade new file mode 100644 index 0000000000..46016cf93f --- /dev/null +++ b/KoreBuild-dotnet/build/_nuget-packages-add.shade @@ -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'