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

Do not assume content of the SAMPLES_PROJECT_GLOB variable #164

Merged
merged 1 commit into from Feb 7, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions build/shade/_k-standard-goals.shade
Expand Up @@ -154,13 +154,15 @@ default SAMPLES_PROJECT_GLOB = "samples/*/*.csproj"

projectGlobs.AddRange(srcProjects);
}

if (!BuildSrcOnly && Directory.Exists("test"))
{
projectGlobs.AddRange(Files.Include(TEST_PROJECT_GLOB).ToList());
projectGlobs.AddRange(Files.Include(TEST_PROJECT_GLOB).ToList());
}
if (!BuildSrcOnly && Directory.Exists("samples") && Directory.EnumerateFiles("samples", "*.csproj", SearchOption.AllDirectories).Any())

if (!BuildSrcOnly && Directory.Exists("samples"))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put another way, alright if we require an empty samples folder to enable SAMPLES_PROJECT_GLOB. But requiring a (no-op) project is a bit much.

{
projectGlobs.AddRange(Files.Include(SAMPLES_PROJECT_GLOB).ToList());
projectGlobs.AddRange(Files.Include(SAMPLES_PROJECT_GLOB).ToList());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this line will still throw if SAMPLES_PROJECT_GLOB contains an entry that starts with a non-existent folder. One would hope those overriding this variable know what they're doing…

}

if (projectGlobs.Any())
Expand Down