Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up Build.cs #2093

Merged
merged 16 commits into from Jan 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions .nuke/build.schema.json
Expand Up @@ -73,6 +73,7 @@
"Clean",
"CodeCoverage",
"Compile",
"Informations",
"Pack",
"Push",
"Restore",
Expand All @@ -97,6 +98,7 @@
"Clean",
"CodeCoverage",
"Compile",
"Informations",
"Pack",
"Push",
"Restore",
Expand Down
11 changes: 9 additions & 2 deletions Build/Build.cs
Expand Up @@ -69,13 +69,20 @@ class Build : NukeBuild

string SemVer;

Target Clean => _ => _
.OnlyWhenDynamic(() => RunAllTargets || HasSourceChanges)
Target Informations => _ => _
IT-VBFK marked this conversation as resolved.
Show resolved Hide resolved
.OnlyWhenDynamic(() => !IsLocalBuild)
.Executes(() =>
{
Information(BranchSpec);
IT-VBFK marked this conversation as resolved.
Show resolved Hide resolved
Information(BuildNumber);
Information(PullRequestBase);
});

Target Clean => _ => _
.Triggers(Informations)
IT-VBFK marked this conversation as resolved.
Show resolved Hide resolved
.OnlyWhenDynamic(() => RunAllTargets || HasSourceChanges)
.Executes(() =>
{
EnsureCleanDirectory(ArtifactsDirectory);
EnsureCleanDirectory(TestResultsDirectory);
});
Expand Down