nuke
nuke copied to clipboard
Attribute to disable default output
Description
Add an attribute that disables logo, target headers, and summary without having to pass arguments (like --no-logo
). Particularly for common tools not used in CI/CD this is good to have.
class DisableDefaultOutput : Attribute
{
public DisableDefaultOutput(params DefaultOutputKind[] disabledOutputs)
{
// Assume empty => all
}
}
public enum OutputKind
{
Logo,
Target,
Summary
}
Adapt NukeBuild.WriteLogo
, NukeBuild.WriteTarget
, and NukeBuild.WriteSummary
to check for attribute.
Usage Example
[Disable
class Build : NukeBuild
{
Target Foo => _ => _
.Executes(() => {});
}