move formatting code to optional flag (#2085)

* move formatting code to flag

* reformat code
This commit is contained in:
Brendan Forster
2020-02-06 10:48:38 -04:00
committed by GitHub
parent 45621c0c79
commit 56895ea621
4 changed files with 4 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ namespace Octokit
[Parameter(Value = "skipped")]
Skipped,
[Parameter(Value = "stale")]
Stale,
}

View File

@@ -10,6 +10,7 @@ public class Context : FrostingContext
public string Target { get; set; }
public new string Configuration { get; set; }
public bool LinkSources { get; set; }
public bool FormatCode { get; set; }
public BuildVersion Version { get; set; }
public DirectoryPath Artifacts { get; set; }

View File

@@ -12,6 +12,7 @@ public class Lifetime : FrostingLifetime<Context>
context.Target = context.Argument("target", "Default");
context.Configuration = context.Argument("configuration", "Release");
context.LinkSources = context.Argument("linkSources", false);
context.FormatCode = context.Argument("formatCode", false);
context.Artifacts = "./packaging/";
context.CodeCoverage = "./coverage-results/";

View File

@@ -15,6 +15,6 @@ public sealed class FormatCode : FrostingTask<Context>
public override bool ShouldRun(Context context)
{
return context.IsLocalBuild;
return context.FormatCode;
}
}