nuke icon indicating copy to clipboard operation
nuke copied to clipboard

Attribute to disable default output

Open matkoch opened this issue 2 years ago • 0 comments

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(() => {});
}

matkoch avatar Jun 27 '22 17:06 matkoch