Avoid path too long errors when performing BuildV2 builds in MVC repo
- do not glob to the ends of the earth when looking for `project.json` files nits: - remove unused variable in `_kpm-build.shade` - remove incorrect comment in `_kpm-pack.shade` - clean up some trailing whitespace
This commit is contained in:
parent
a3d943197a
commit
cb3dea63a3
|
|
@ -117,7 +117,8 @@ default NUGET_FEED = 'https://api.nuget.org/v3/index.json'
|
|||
// If the src folder, build and create the packages
|
||||
if (Directory.Exists("src"))
|
||||
{
|
||||
DnuPack("src/**", BUILD_DIR, Configuration);
|
||||
// Handle projects 1 to 3 levels down from src/, avoiding path too long errors.
|
||||
DnuPack("src/*;src/*/*;src/*/*/*", BUILD_DIR, Configuration);
|
||||
|
||||
foreach (var nupkg in Files.Include(Path.Combine(BUILD_DIR, "*/*.nupkg")))
|
||||
{
|
||||
|
|
@ -129,11 +130,17 @@ default NUGET_FEED = 'https://api.nuget.org/v3/index.json'
|
|||
var projectsToBuild = new List<string>();
|
||||
if (Directory.Exists("test"))
|
||||
{
|
||||
projectsToBuild.Add("test/**");
|
||||
// Handle projects 1 to 3 levels down from test/, avoiding path too long errors.
|
||||
projectsToBuild.Add("test/*");
|
||||
projectsToBuild.Add("test/*/*");
|
||||
projectsToBuild.Add("test/*/*/*");
|
||||
}
|
||||
if (Directory.Exists("samples"))
|
||||
{
|
||||
projectsToBuild.Add("samples/**");
|
||||
// Handle projects 1 to 3 levels down from samples/, avoiding path too long errors.
|
||||
projectsToBuild.Add("samples/*");
|
||||
projectsToBuild.Add("samples/*/*");
|
||||
projectsToBuild.Add("samples/*/*/*");
|
||||
}
|
||||
|
||||
if (projectsToBuild.Any())
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ default build_options='${E("NUGET3_build_options")}'
|
|||
if (IsBuildV2)
|
||||
{
|
||||
var projectsToPack = new List<string>();
|
||||
|
||||
foreach(var arg in projectFile.Split((char)';'))
|
||||
{
|
||||
if (!arg.Contains("*"))
|
||||
|
|
@ -50,7 +49,6 @@ default build_options='${E("NUGET3_build_options")}'
|
|||
else
|
||||
{
|
||||
var projectFolder=Path.GetDirectoryName(projectFile);
|
||||
var projectName=Path.GetFileName(projectFolder);
|
||||
var projectBin=Path.Combine(projectFolder, "bin", configuration);
|
||||
|
||||
DeleteFolder(projectBin);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@{/*
|
||||
|
||||
kpm-pack
|
||||
Builds package from project. Downloads and executes k sdk tools.
|
||||
Builds package from project.
|
||||
|
||||
projectFile=''
|
||||
Required. Path to the project.json to build.
|
||||
|
|
@ -20,7 +20,6 @@ default pack_options='${E("NUGET3_pack_options")}'
|
|||
if (IsBuildV2)
|
||||
{
|
||||
var projectsToPack = new List<string>();
|
||||
|
||||
foreach(var arg in projectFile.Split((char)';'))
|
||||
{
|
||||
if (!arg.Contains("*"))
|
||||
|
|
|
|||
Loading…
Reference in New Issue