-
-
Notifications
You must be signed in to change notification settings - Fork 742
/
Copy pathDefaultCommandSettings.cs
67 lines (54 loc) · 2.58 KB
/
DefaultCommandSettings.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.ComponentModel;
using Cake.Cli;
using Cake.Core.Diagnostics;
using Cake.Core.IO;
using Spectre.Console.Cli;
namespace Cake.Commands
{
public sealed class DefaultCommandSettings : CommandSettings
{
[CommandArgument(0, "[SCRIPT]")]
[Description("The Cake script. Defaults to [grey]build.cake[/]")]
[TypeConverter(typeof(Cli.FilePathConverter))]
[DefaultValue("build.cake")]
public FilePath Script { get; set; }
[CommandOption("--bootstrap")]
[Description("Download/install modules defined by [grey]#module[/] directives, but do not run build.")]
public bool Bootstrap { get; set; }
[CommandOption("--skip-bootstrap")]
[Description("Skips bootstrapping when running build.")]
public bool SkipBootstrap { get; set; }
[CommandOption("--debug|-d")]
[Description("Launches script in debug mode.")]
public bool Debug { get; set; }
[CommandOption("--verbosity|-v <VERBOSITY>")]
[Description("Specifies the amount of information to be displayed.\n(Quiet, Minimal, Normal, Verbose, Diagnostic)")]
[TypeConverter(typeof(VerbosityConverter))]
[DefaultValue(Verbosity.Normal)]
public Verbosity Verbosity { get; set; }
[CommandOption("--description|--descriptions|--showdescription|--showdescriptions")]
[Description("Shows description for each task.")]
public bool Description { get; set; }
[CommandOption("--tree|--showtree")]
[Description("Shows the task dependency tree.")]
public bool Tree { get; set; }
[CommandOption("--dryrun|--noop|--whatif")]
[Description("Performs a dry run.")]
public bool DryRun { get; set; }
[CommandOption("--exclusive|-e")]
[Description("Executes the target task without any dependencies.")]
public bool Exclusive { get; set; }
[CommandOption("--version|--ver")]
[Description("Displays version information.")]
public bool ShowVersion { get; set; }
[CommandOption("--info")]
[Description("Displays additional information about Cake.")]
public bool ShowInfo { get; set; }
[CommandOption("--" + Infrastructure.Constants.Cache.InvalidateScriptCache)]
[Description("Forces the script to be recompiled if caching is enabled.")]
public bool Recompile { get; set; }
}
}