Skip to content

Commit

Permalink
Make sure, that HasSourceChanges is the opposite of `HasDocumentati…
Browse files Browse the repository at this point in the history
…onChanges`
  • Loading branch information
IT-VBFK committed Jan 14, 2023
1 parent f7d0398 commit 363408e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -286,16 +286,16 @@ class Build : NukeBuild
customLogger: (_, msg) => Error(msg));
});

bool HasDocumentationChanges =>
Changes.Any(x =>
x.StartsWith("docs") ||
x.StartsWith("CONTRIBUTING.md") ||
x.StartsWith("cSpell.json") ||
x.StartsWith("LICENSE") ||
x.StartsWith("README.md"));

bool HasSourceChanges =>
Changes.Any(x => !x.StartsWith("docs"));
bool HasDocumentationChanges => Changes.Any(x => IsDocumentation(x));

bool HasSourceChanges => Changes.Any(x => !IsDocumentation(x));

static bool IsDocumentation(string x) =>
x.StartsWith("docs") ||
x.StartsWith("CONTRIBUTING.md") ||
x.StartsWith("cSpell.json") ||
x.StartsWith("LICENSE") ||
x.StartsWith("README.md");

string[] Changes =>
Repository.Diff
Expand Down

0 comments on commit 363408e

Please sign in to comment.