Skip to content
This repository has been archived by the owner on May 21, 2022. It is now read-only.

Commit

Permalink
cake spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
pomma89 committed Apr 7, 2017
1 parent f5331ff commit 6b6c226
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ private void Build(string cfg)
// NoIncremental = true
// });
//}
MSBuild(solutionFile, settings =>
{
MSBuild(solutionFile, settings =>
{
settings.SetConfiguration(cfg);
settings.SetMaxCpuCount(0);
});
settings.SetMaxCpuCount(0);
});
}

private void Test(string cfg)
Expand All @@ -107,43 +107,43 @@ private void Test(string cfg)
// NoResults = true
//});

const string flags = "--noheader --noresult";
const string errMsg = " - Unit test failure - ";

Parallel.ForEach(GetFiles("./test/**/bin/{cfg}/*/*.UnitTests.exe".Replace("{cfg}", cfg)), netExe =>
{
if (StartProcess(netExe, flags) != 0)
{
throw new Exception(cfg + errMsg + netExe);
}
});

Parallel.ForEach(GetFiles("./test/**/bin/{cfg}/*/*.UnitTests.dll".Replace("{cfg}", cfg)), netCoreDll =>
{
DotNetCoreExecute(netCoreDll, flags);
});
const string flags = "--noheader --noresult";
const string errMsg = " - Unit test failure - ";

Parallel.ForEach(GetFiles("./test/**/bin/{cfg}/*/*.UnitTests.exe".Replace("{cfg}", cfg)), netExe =>
{
if (StartProcess(netExe, flags) != 0)
{
throw new Exception(cfg + errMsg + netExe);
}
});

Parallel.ForEach(GetFiles("./test/**/bin/{cfg}/*/*.UnitTests.dll".Replace("{cfg}", cfg)), netCoreDll =>
{
DotNetCoreExecute(netCoreDll, flags);
});
}

private void Pack(string cfg)
{
Parallel.ForEach(GetFiles("./src/**/*.csproj"), project =>
{
Parallel.ForEach(GetFiles("./src/**/*.csproj"), project =>
{
//DotNetCorePack(project.FullPath, new DotNetCorePackSettings
//{
// Configuration = cfg,
// OutputDirectory = artifactsDir,
// NoBuild = true
//});

MSBuild(project, settings =>
{
settings.SetConfiguration(cfg);
settings.SetMaxCpuCount(0);
settings.WithTarget("pack");
settings.WithProperty("IncludeSymbols", new[] { "true" });
});

var packDir = project.GetDirectory().Combine("bin").Combine(cfg);
MoveFiles(GetFiles(packDir + "/*.nupkg"), artifactsDir);
});
MSBuild(project, settings =>
{
settings.SetConfiguration(cfg);
settings.SetMaxCpuCount(0);
settings.WithTarget("pack");
settings.WithProperty("IncludeSymbols", new[] { "true" });
});

var packDir = project.GetDirectory().Combine("bin").Combine(cfg);
MoveFiles(GetFiles(packDir + "/*.nupkg"), artifactsDir);
});
}

0 comments on commit 6b6c226

Please sign in to comment.