diff --git a/build/Build.cs b/build/Build.cs index 3dfadf5..9ba86b3 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -6,7 +6,7 @@ using Nuke.Common.Tools.DotNet; using Nuke.Common.Tools.SonarScanner; using Serilog; -class Build : NukeBuild +sealed class Build : NukeBuild { /// Support plugins are available for: /// - JetBrains ReSharper https://nuke.build/resharper @@ -18,6 +18,8 @@ class Build : NukeBuild [Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release; + [Parameter] readonly bool SupportsDocker = true; + [Parameter] readonly string SonarToken; [Parameter] readonly string SonarHostUrl; @@ -43,6 +45,7 @@ class Build : NukeBuild Target Compile => _ => _ .DependsOn(Clean) .DependsOn(Restore) + .Requires(SupportsDocker) .Executes(() => { DockerTasks.DockerStackRm(settings => settings.SetStacks("continuity")); @@ -51,6 +54,7 @@ class Build : NukeBuild Target Pack => _ => _ .DependsOn(SonarScan) + .Requires(SupportsDocker) .Executes(() => { DockerTasks.DockerBuild(settings => settings