Rename buildserver command.

This commit renames the `buildserver` command to `build-server`.

Fixes #9075.
This commit is contained in:
Peter Huene 2018-04-17 17:04:12 -07:00
parent 7d375481bc
commit 3f1ab372b4
No known key found for this signature in database
GPG key ID: E1D265D820213D6A
7 changed files with 17 additions and 17 deletions

View file

@ -151,7 +151,7 @@ namespace Microsoft.DotNet.Cli
Command = ToolCommand.Run, Command = ToolCommand.Run,
DocLink = "https://aka.ms/dotnet-tool" DocLink = "https://aka.ms/dotnet-tool"
}, },
["buildserver"] = new BuiltInCommandMetadata ["build-server"] = new BuiltInCommandMetadata
{ {
Command = BuildServerCommand.Run, Command = BuildServerCommand.Run,
DocLink = "https://aka.ms/dotnet-build-server" DocLink = "https://aka.ms/dotnet-build-server"

View file

@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Tools.BuildServer
{ {
public class BuildServerCommand : DotNetTopLevelCommandBase public class BuildServerCommand : DotNetTopLevelCommandBase
{ {
protected override string CommandName => "buildserver"; protected override string CommandName => "build-server";
protected override string FullCommandNameLocalized => LocalizableStrings.BuildServerCommandName; protected override string FullCommandNameLocalized => LocalizableStrings.BuildServerCommandName;
protected override string ArgumentName => ""; protected override string ArgumentName => "";
protected override string ArgumentDescriptionLocalized => ""; protected override string ArgumentDescriptionLocalized => "";

View file

@ -11,7 +11,7 @@ namespace Microsoft.DotNet.Cli
public static Command CreateCommand() public static Command CreateCommand()
{ {
return Create.Command( return Create.Command(
"buildserver", "build-server",
LocalizableStrings.CommandDescription, LocalizableStrings.CommandDescription,
Accept.NoArguments(), Accept.NoArguments(),
CommonOptions.HelpOption(), CommonOptions.HelpOption(),

View file

@ -29,7 +29,7 @@ path-to-application:
vstest {LocalizableStrings.VsTestDefinition} vstest {LocalizableStrings.VsTestDefinition}
store {LocalizableStrings.StoreDefinition} store {LocalizableStrings.StoreDefinition}
tool {LocalizableStrings.ToolDefinition} tool {LocalizableStrings.ToolDefinition}
buildserver {LocalizableStrings.BuildServerDefinition} build-server {LocalizableStrings.BuildServerDefinition}
help {LocalizableStrings.HelpDefinition} help {LocalizableStrings.HelpDefinition}
{LocalizableStrings.CommonOptions}: {LocalizableStrings.CommonOptions}:

View file

@ -40,7 +40,7 @@ SDK commands:
vstest Runs Microsoft Test Execution Command Line Tool. vstest Runs Microsoft Test Execution Command Line Tool.
store Stores the specified assemblies in the runtime store. store Stores the specified assemblies in the runtime store.
tool Install or work with tools that extend the .NET experience. tool Install or work with tools that extend the .NET experience.
buildserver Interact with servers started by a build. build-server Interact with servers started by a build.
help Show help. help Show help.
Common options: Common options:

View file

@ -172,9 +172,9 @@ namespace Microsoft.DotNet.Tests.Commands
private BuildServerShutdownCommand CreateCommand(string options = "", IEnumerable<IBuildServerManager> managers = null) private BuildServerShutdownCommand CreateCommand(string options = "", IEnumerable<IBuildServerManager> managers = null)
{ {
ParseResult result = Parser.Instance.Parse("dotnet buildserver shutdown " + options); ParseResult result = Parser.Instance.Parse("dotnet build-server shutdown " + options);
return new BuildServerShutdownCommand( return new BuildServerShutdownCommand(
options: result["dotnet"]["buildserver"]["shutdown"], options: result["dotnet"]["build-server"]["shutdown"],
result: result, result: result,
managers: managers, managers: managers,
useOrderedWait: true, useOrderedWait: true,

View file

@ -23,9 +23,9 @@ namespace Microsoft.DotNet.Tests.ParserTests
[Fact] [Fact]
public void GivenNoOptionsAllFlagsAreFalse() public void GivenNoOptionsAllFlagsAreFalse()
{ {
var result = Parser.Instance.Parse("dotnet buildserver shutdown"); var result = Parser.Instance.Parse("dotnet build-server shutdown");
var options = result["dotnet"]["buildserver"]["shutdown"]; var options = result["dotnet"]["build-server"]["shutdown"];
options.ValueOrDefault<bool>("msbuild").Should().Be(false); options.ValueOrDefault<bool>("msbuild").Should().Be(false);
options.ValueOrDefault<bool>("vbcscompiler").Should().Be(false); options.ValueOrDefault<bool>("vbcscompiler").Should().Be(false);
options.ValueOrDefault<bool>("razor").Should().Be(false); options.ValueOrDefault<bool>("razor").Should().Be(false);
@ -34,9 +34,9 @@ namespace Microsoft.DotNet.Tests.ParserTests
[Fact] [Fact]
public void GivenMSBuildOptionIsItTrue() public void GivenMSBuildOptionIsItTrue()
{ {
var result = Parser.Instance.Parse("dotnet buildserver shutdown --msbuild"); var result = Parser.Instance.Parse("dotnet build-server shutdown --msbuild");
var options = result["dotnet"]["buildserver"]["shutdown"]; var options = result["dotnet"]["build-server"]["shutdown"];
options.ValueOrDefault<bool>("msbuild").Should().Be(true); options.ValueOrDefault<bool>("msbuild").Should().Be(true);
options.ValueOrDefault<bool>("vbcscompiler").Should().Be(false); options.ValueOrDefault<bool>("vbcscompiler").Should().Be(false);
options.ValueOrDefault<bool>("razor").Should().Be(false); options.ValueOrDefault<bool>("razor").Should().Be(false);
@ -45,9 +45,9 @@ namespace Microsoft.DotNet.Tests.ParserTests
[Fact] [Fact]
public void GivenVBCSCompilerOptionIsItTrue() public void GivenVBCSCompilerOptionIsItTrue()
{ {
var result = Parser.Instance.Parse("dotnet buildserver shutdown --vbcscompiler"); var result = Parser.Instance.Parse("dotnet build-server shutdown --vbcscompiler");
var options = result["dotnet"]["buildserver"]["shutdown"]; var options = result["dotnet"]["build-server"]["shutdown"];
options.ValueOrDefault<bool>("msbuild").Should().Be(false); options.ValueOrDefault<bool>("msbuild").Should().Be(false);
options.ValueOrDefault<bool>("vbcscompiler").Should().Be(true); options.ValueOrDefault<bool>("vbcscompiler").Should().Be(true);
options.ValueOrDefault<bool>("razor").Should().Be(false); options.ValueOrDefault<bool>("razor").Should().Be(false);
@ -56,9 +56,9 @@ namespace Microsoft.DotNet.Tests.ParserTests
[Fact] [Fact]
public void GivenRazorOptionIsItTrue() public void GivenRazorOptionIsItTrue()
{ {
var result = Parser.Instance.Parse("dotnet buildserver shutdown --razor"); var result = Parser.Instance.Parse("dotnet build-server shutdown --razor");
var options = result["dotnet"]["buildserver"]["shutdown"]; var options = result["dotnet"]["build-server"]["shutdown"];
options.ValueOrDefault<bool>("msbuild").Should().Be(false); options.ValueOrDefault<bool>("msbuild").Should().Be(false);
options.ValueOrDefault<bool>("vbcscompiler").Should().Be(false); options.ValueOrDefault<bool>("vbcscompiler").Should().Be(false);
options.ValueOrDefault<bool>("razor").Should().Be(true); options.ValueOrDefault<bool>("razor").Should().Be(true);
@ -67,9 +67,9 @@ namespace Microsoft.DotNet.Tests.ParserTests
[Fact] [Fact]
public void GivenMultipleOptionsThoseAreTrue() public void GivenMultipleOptionsThoseAreTrue()
{ {
var result = Parser.Instance.Parse("dotnet buildserver shutdown --razor --msbuild"); var result = Parser.Instance.Parse("dotnet build-server shutdown --razor --msbuild");
var options = result["dotnet"]["buildserver"]["shutdown"]; var options = result["dotnet"]["build-server"]["shutdown"];
options.ValueOrDefault<bool>("msbuild").Should().Be(true); options.ValueOrDefault<bool>("msbuild").Should().Be(true);
options.ValueOrDefault<bool>("vbcscompiler").Should().Be(false); options.ValueOrDefault<bool>("vbcscompiler").Should().Be(false);
options.ValueOrDefault<bool>("razor").Should().Be(true); options.ValueOrDefault<bool>("razor").Should().Be(true);