Merge pull request #7006 from nguerrera/command-line-parser

Use latest command line parser
This commit is contained in:
Nick Guerrera 2017-06-27 15:46:43 -07:00 committed by GitHub
commit 0353374f10
11 changed files with 18 additions and 50 deletions

View file

@ -23,8 +23,7 @@ namespace Microsoft.DotNet.Tools.DependencyInvoker
Create.Option(
"-h|--help",
"Show help information",
Accept.NoArguments(),
materialize: o => o.Option.Command().HelpView()),
Accept.NoArguments()),
Create.Option(
"-p|--project-path",
"Path to Project.json that contains the tool dependency",

View file

@ -27,7 +27,7 @@
<TemplateEngineTemplate2_0Version>1.0.0-beta2-20170620-266</TemplateEngineTemplate2_0Version>
<PlatformAbstractionsVersion>2.0.0-preview3-25426-01</PlatformAbstractionsVersion>
<DependencyModelVersion>2.0.0-preview3-25426-01</DependencyModelVersion>
<CliCommandLineParserVersion>0.1.0-alpha-142</CliCommandLineParserVersion>
<CliCommandLineParserVersion>0.1.1-alpha-167</CliCommandLineParserVersion>
<CliMigrateVersion>1.2.1-alpha-002133</CliMigrateVersion>
<MicroBuildVersion>0.2.0</MicroBuildVersion>
<SpaTemplateVersion>1.0.0-preview-000321</SpaTemplateVersion>

View file

@ -13,8 +13,7 @@ namespace Microsoft.DotNet.Cli
Create.Option(
"-h|--help",
CommonLocalizableStrings.ShowHelpDescription,
Accept.NoArguments(),
materialize: o => o.Option.Command().HelpView());
Accept.NoArguments());
public static Option VerbosityOption() =>
Create.Option(

View file

@ -15,9 +15,7 @@ namespace Microsoft.DotNet.Cli.Add.Reference.Tests
{
public class GivenDotnetAddReference : TestBase
{
private const string HelpText = @".NET Add Project to Project reference Command
Usage: dotnet add <PROJECT> reference [options] <args>
private const string HelpText = @"Usage: dotnet add <PROJECT> reference [options] <args>
Arguments:
<PROJECT> The project file to operate on. If a file is not specified, the command will search the current directory for one.
@ -28,9 +26,7 @@ Options:
-f, --framework <FRAMEWORK> Add reference only when targeting a specific framework
";
private const string AddCommandHelpText = @".NET Add Command
Usage: dotnet add [options] <PROJECT> [command]
private const string AddCommandHelpText = @"Usage: dotnet add [options] <PROJECT> [command]
Arguments:
<PROJECT> The project file to operate on. If a file is not specified, the command will search the current directory for one.

View file

@ -11,9 +11,7 @@ namespace Microsoft.DotNet.Help.Tests
public class GivenThatIWantToShowHelpForDotnetHelpCommand : TestBase
{
private const string HelpText =
@".NET CLI help utility
Usage: dotnet help [options] <COMMAND_NAME>
@"Usage: dotnet help [options] <COMMAND_NAME>
Arguments:
<COMMAND_NAME> CLI command for which to view more detailed help.

View file

@ -14,9 +14,7 @@ namespace Microsoft.DotNet.Cli.List.Reference.Tests
{
public class GivenDotnetListReference : TestBase
{
private const string HelpText = @".NET Core Project-to-Project dependency viewer
Usage: dotnet list <PROJECT> reference [options]
private const string HelpText = @"Usage: dotnet list <PROJECT> reference [options]
Arguments:
<PROJECT> The project file to operate on. If a file is not specified, the command will search the current directory for one.
@ -25,9 +23,7 @@ Options:
-h, --help Show help information.
";
private const string ListCommandHelpText = @".NET List Command
Usage: dotnet list [options] <PROJECT> [command]
private const string ListCommandHelpText = @"Usage: dotnet list [options] <PROJECT> [command]
Arguments:
<PROJECT> The project file to operate on. If a file is not specified, the command will search the current directory for one.

View file

@ -12,9 +12,7 @@ namespace Microsoft.DotNet.Cli.Remove.Package.Tests
{
public class GivenDotnetRemovePackage : TestBase
{
private const string HelpText = @".NET Remove Package reference Command.
Usage: dotnet remove <PROJECT> package [options] <PACKAGE_NAME>
private const string HelpText = @"Usage: dotnet remove <PROJECT> package [options] <PACKAGE_NAME>
Arguments:
<PROJECT> The project file to operate on. If a file is not specified, the command will search the current directory for one.
@ -24,9 +22,7 @@ Options:
-h, --help Show help information.
";
private const string RemoveCommandHelpText = @".NET Remove Command
Usage: dotnet remove [options] <PROJECT> [command]
private const string RemoveCommandHelpText = @"Usage: dotnet remove [options] <PROJECT> [command]
Arguments:
<PROJECT> The project file to operate on. If a file is not specified, the command will search the current directory for one.

View file

@ -14,9 +14,7 @@ namespace Microsoft.DotNet.Cli.Remove.Reference.Tests
{
public class GivenDotnetRemoveReference : TestBase
{
private const string HelpText = @".NET Remove Project to Project reference Command
Usage: dotnet remove <PROJECT> reference [options] <args>
private const string HelpText = @"Usage: dotnet remove <PROJECT> reference [options] <args>
Arguments:
<PROJECT> The project file to operate on. If a file is not specified, the command will search the current directory for one.
@ -27,9 +25,7 @@ Options:
-f, --framework <FRAMEWORK> Remove reference only when targeting a specific framework
";
private const string RemoveCommandHelpText = @".NET Remove Command
Usage: dotnet remove [options] <PROJECT> [command]
private const string RemoveCommandHelpText = @"Usage: dotnet remove [options] <PROJECT> [command]
Arguments:
<PROJECT> The project file to operate on. If a file is not specified, the command will search the current directory for one.

View file

@ -16,9 +16,7 @@ namespace Microsoft.DotNet.Cli.Sln.Add.Tests
{
public class GivenDotnetSlnAdd : TestBase
{
private string HelpText = @".NET Add project(s) to a solution file Command
Usage: dotnet sln <SLN_FILE> add [options] <args>
private string HelpText = @"Usage: dotnet sln <SLN_FILE> add [options] <args>
Arguments:
<SLN_FILE> Solution file to operate on. If not specified, the command will search the current directory for one.
@ -28,9 +26,7 @@ Options:
-h, --help Show help information.
";
private const string SlnCommandHelpText = @".NET modify solution file command
Usage: dotnet sln [options] <SLN_FILE> [command]
private const string SlnCommandHelpText = @"Usage: dotnet sln [options] <SLN_FILE> [command]
Arguments:
<SLN_FILE> Solution file to operate on. If not specified, the command will search the current directory for one.

View file

@ -14,9 +14,7 @@ namespace Microsoft.DotNet.Cli.Sln.List.Tests
{
public class GivenDotnetSlnList : TestBase
{
private const string HelpText = @".NET List project(s) in a solution file Command
Usage: dotnet sln <SLN_FILE> list [options]
private const string HelpText = @"Usage: dotnet sln <SLN_FILE> list [options]
Arguments:
<SLN_FILE> Solution file to operate on. If not specified, the command will search the current directory for one.
@ -25,9 +23,7 @@ Options:
-h, --help Show help information.
";
private const string SlnCommandHelpText = @".NET modify solution file command
Usage: dotnet sln [options] <SLN_FILE> [command]
private const string SlnCommandHelpText = @"Usage: dotnet sln [options] <SLN_FILE> [command]
Arguments:
<SLN_FILE> Solution file to operate on. If not specified, the command will search the current directory for one.

View file

@ -14,9 +14,7 @@ namespace Microsoft.DotNet.Cli.Sln.Remove.Tests
{
public class GivenDotnetSlnRemove : TestBase
{
private const string HelpText = @".NET Remove project(s) from a solution file Command
Usage: dotnet sln <SLN_FILE> remove [options] <args>
private const string HelpText = @"Usage: dotnet sln <SLN_FILE> remove [options] <args>
Arguments:
<SLN_FILE> Solution file to operate on. If not specified, the command will search the current directory for one.
@ -26,9 +24,7 @@ Options:
-h, --help Show help information.
";
private const string SlnCommandHelpText = @".NET modify solution file command
Usage: dotnet sln [options] <SLN_FILE> [command]
private const string SlnCommandHelpText = @"Usage: dotnet sln [options] <SLN_FILE> [command]
Arguments:
<SLN_FILE> Solution file to operate on. If not specified, the command will search the current directory for one.