Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,17 @@ Task ("samples")

// build solutions locally
var solutions = GetFiles ("./output/samples/**/*.sln");

Information ("Solutions found:");
foreach (var sln in solutions) {
Information (" " + sln);
}

foreach (var sln in solutions) {
// might have been deleted due to a platform build and cleanup
if (!FileExists (sln))
continue;

var name = sln.GetFilenameWithoutExtension ();
var slnPlatform = name.GetExtension ();

Expand All @@ -460,6 +470,8 @@ Task ("samples")
if (!variants.Any ()) {
// there is no platform variant
BuildSample (sln);
// delete the built sample
CleanDirectories (sln.GetDirectory ().FullPath);
} else {
// skip as there is a platform variant
}
Expand All @@ -472,6 +484,8 @@ Task ("samples")
(isWin && slnPlatform == ".windows");
if (shouldBuild) {
BuildSample (sln);
// delete the built sample
CleanDirectories (sln.GetDirectory ().FullPath);
} else {
// skip this as this is not the correct platform
}
Expand Down