Resolve build breaks

This commit is contained in:
Piotr Puszkiewicz 2017-03-10 17:52:40 -08:00
parent 23d4fb32f3
commit 3bdfe28765
7 changed files with 41 additions and 36 deletions

View file

@ -30,7 +30,7 @@ namespace Microsoft.DotNet.Cli
Create.Option( Create.Option(
"-f|--framework", "-f|--framework",
"Target framework to publish for. The target framework has to be specified in the project file.", "Target framework to publish for. The target framework has to be specified in the project file.",
Accept.ExactlyOneArgument Accept.ExactlyOneArgument()
.WithSuggestionsFrom(_ => Suggest.TargetFrameworksFromProjectFile()) .WithSuggestionsFrom(_ => Suggest.TargetFrameworksFromProjectFile())
.With(name: "FRAMEWORK") .With(name: "FRAMEWORK")
.ForwardAs(o => $"/p:TargetFramework={o.Arguments.Single()}")); .ForwardAs(o => $"/p:TargetFramework={o.Arguments.Single()}"));
@ -39,7 +39,7 @@ namespace Microsoft.DotNet.Cli
Create.Option( Create.Option(
"-r|--runtime", "-r|--runtime",
"Publish the project for a given runtime. This is used when creating self-contained deployment. Default is to publish a framework-dependent app.", "Publish the project for a given runtime. This is used when creating self-contained deployment. Default is to publish a framework-dependent app.",
Accept.ExactlyOneArgument Accept.ExactlyOneArgument()
.WithSuggestionsFrom(_ => Suggest.RunTimesFromProjectFile()) .WithSuggestionsFrom(_ => Suggest.RunTimesFromProjectFile())
.With(name: "RUNTIME_IDENTIFIER") .With(name: "RUNTIME_IDENTIFIER")
.ForwardAs(o => $"/p:RuntimeIdentifier={o.Arguments.Single()}")); .ForwardAs(o => $"/p:RuntimeIdentifier={o.Arguments.Single()}"));
@ -48,7 +48,7 @@ namespace Microsoft.DotNet.Cli
Create.Option( Create.Option(
"-c|--configuration", "-c|--configuration",
"Configuration to use for building the project. Default for most projects is \"Debug\".", "Configuration to use for building the project. Default for most projects is \"Debug\".",
Accept.ExactlyOneArgument Accept.ExactlyOneArgument()
.With(name: "CONFIGURATION") .With(name: "CONFIGURATION")
.WithSuggestionsFrom("DEBUG", "RELEASE") .WithSuggestionsFrom("DEBUG", "RELEASE")
.ForwardAs(o => $"/p:Configuration={o.Arguments.Single()}")); .ForwardAs(o => $"/p:Configuration={o.Arguments.Single()}"));
@ -57,7 +57,7 @@ namespace Microsoft.DotNet.Cli
Create.Option( Create.Option(
"--version-suffix", "--version-suffix",
"Defines the value for the $(VersionSuffix) property in the project.", "Defines the value for the $(VersionSuffix) property in the project.",
Accept.ExactlyOneArgument Accept.ExactlyOneArgument()
.With(name: "VERSION_SUFFIX") .With(name: "VERSION_SUFFIX")
.ForwardAs(o => $"/p:VersionSuffix={o.Arguments.Single()}")); .ForwardAs(o => $"/p:VersionSuffix={o.Arguments.Single()}"));

View file

@ -13,12 +13,12 @@ namespace Microsoft.DotNet.Cli
Create.Command( Create.Command(
"cache", "cache",
LocalizableStrings.AppDescription, LocalizableStrings.AppDescription,
Accept.ZeroOrMoreArguments, Accept.ZeroOrMoreArguments(),
CommonOptions.HelpOption(), CommonOptions.HelpOption(),
Create.Option( Create.Option(
"-e|--entries", "-e|--entries",
LocalizableStrings.ProjectEntryDescription, LocalizableStrings.ProjectEntryDescription,
Accept.OneOrMoreArguments Accept.OneOrMoreArguments()
.With(name: LocalizableStrings.ProjectEntries) .With(name: LocalizableStrings.ProjectEntries)
.ForwardAs(o => .ForwardAs(o =>
{ {
@ -34,7 +34,7 @@ namespace Microsoft.DotNet.Cli
Create.Option( Create.Option(
"--framework-version", "--framework-version",
LocalizableStrings.FrameworkVersionOptionDescription, LocalizableStrings.FrameworkVersionOptionDescription,
Accept.ExactlyOneArgument Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.FrameworkVersionOption) .With(name: LocalizableStrings.FrameworkVersionOption)
.ForwardAs(o => $"/p:FX_Version={o.Arguments.Single()}")), .ForwardAs(o => $"/p:FX_Version={o.Arguments.Single()}")),
CommonOptions.RuntimeOption(), CommonOptions.RuntimeOption(),
@ -42,24 +42,24 @@ namespace Microsoft.DotNet.Cli
Create.Option( Create.Option(
"-o|--output", "-o|--output",
LocalizableStrings.OutputOptionDescription, LocalizableStrings.OutputOptionDescription,
Accept.ExactlyOneArgument Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.OutputOption) .With(name: LocalizableStrings.OutputOption)
.ForwardAs(o => $"/p:ComposeDir={o.Arguments.Single()}")), .ForwardAs(o => $"/p:ComposeDir={o.Arguments.Single()}")),
Create.Option( Create.Option(
"-w|--working-dir", "-w|--working-dir",
LocalizableStrings.IntermediateWorkingDirOptionDescription, LocalizableStrings.IntermediateWorkingDirOptionDescription,
Accept.ExactlyOneArgument Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.IntermediateWorkingDirOption) .With(name: LocalizableStrings.IntermediateWorkingDirOption)
.ForwardAs(o => $"/p:ComposeWorkingDir={o.Arguments.Single()}")), .ForwardAs(o => $"/p:ComposeWorkingDir={o.Arguments.Single()}")),
Create.Option( Create.Option(
"--preserve-working-dir", "--preserve-working-dir",
LocalizableStrings.PreserveIntermediateWorkingDirOptionDescription, LocalizableStrings.PreserveIntermediateWorkingDirOptionDescription,
Accept.NoArguments Accept.NoArguments()
.ForwardAs(o => $"/p:PreserveComposeWorkingDir=true")), .ForwardAs(o => $"/p:PreserveComposeWorkingDir=true")),
Create.Option( Create.Option(
"--skip-optimization", "--skip-optimization",
LocalizableStrings.SkipOptimizationOptionDescription, LocalizableStrings.SkipOptimizationOptionDescription,
Accept.NoArguments Accept.NoArguments()
.ForwardAs("/p:SkipOptimization=true")), .ForwardAs("/p:SkipOptimization=true")),
CommonOptions.VerbosityOption()); CommonOptions.VerbosityOption());
} }

View file

@ -13,7 +13,7 @@ namespace Microsoft.DotNet.Cli
Create.Command( Create.Command(
"clean", "clean",
LocalizableStrings.AppFullName, LocalizableStrings.AppFullName,
Accept.ZeroOrMoreArguments, Accept.ZeroOrMoreArguments(),
CommonOptions.HelpOption(), CommonOptions.HelpOption(),
Create.Option("-o|--output", Create.Option("-o|--output",
LocalizableStrings.CmdOutputDirDescription, LocalizableStrings.CmdOutputDirDescription,

View file

@ -14,7 +14,7 @@ namespace Microsoft.DotNet.Cli
Create.Command( Create.Command(
"migrate", "migrate",
".NET Migrate Command", ".NET Migrate Command",
Accept.ZeroOrOneArgument Accept.ZeroOrOneArgument()
.MaterializeAs(o => .MaterializeAs(o =>
{ {
return new MigrateCommand( return new MigrateCommand(

View file

@ -13,28 +13,32 @@ namespace Microsoft.DotNet.Cli
Create.Command( Create.Command(
"pack", "pack",
LocalizableStrings.AppDescription, LocalizableStrings.AppDescription,
Accept.ZeroOrMoreArguments, Accept.ZeroOrMoreArguments(),
CommonOptions.HelpOption(), CommonOptions.HelpOption(),
Create.Option( Create.Option(
"-o|--output", "-o|--output",
LocalizableStrings.CmdOutputDirDescription, LocalizableStrings.CmdOutputDirDescription,
Accept.ExactlyOneArgument() Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.CmdOutputDir) .With(name: LocalizableStrings.CmdOutputDir)
.ForwardAs(o => $"/p:PackageOutputPath={o.Arguments.Single()}")), .ForwardAs(o => $"/p:PackageOutputPath={o.Arguments.Single()}")),
Create.Option("--no-build", Create.Option(
LocalizableStrings.CmdNoBuildOptionDescription, "--no-build",
Accept.NoArguments.ForwardAs("/p:NoBuild=true")), LocalizableStrings.CmdNoBuildOptionDescription,
Create.Option("--include-symbols", Accept.NoArguments().ForwardAs("/p:NoBuild=true")),
LocalizableStrings.CmdIncludeSymbolsDescription, Create.Option(
Accept.NoArguments.ForwardAs("/p:IncludeSymbols=true")), "--include-symbols",
Create.Option("--include-source", LocalizableStrings.CmdIncludeSymbolsDescription,
LocalizableStrings.CmdIncludeSourceDescription, Accept.NoArguments().ForwardAs("/p:IncludeSymbols=true")),
Accept.NoArguments.ForwardAs("/p:IncludeSource=true")), Create.Option(
"--include-source",
LocalizableStrings.CmdIncludeSourceDescription,
Accept.NoArguments().ForwardAs("/p:IncludeSource=true")),
CommonOptions.ConfigurationOption(), CommonOptions.ConfigurationOption(),
CommonOptions.VersionSuffixOption(), CommonOptions.VersionSuffixOption(),
Create.Option("-s|--serviceable", Create.Option(
LocalizableStrings.CmdServiceableDescription, "-s|--serviceable",
Accept.NoArguments.ForwardAs("/p:Serviceable=true")), LocalizableStrings.CmdServiceableDescription,
Accept.NoArguments().ForwardAs("/p:Serviceable=true")),
CommonOptions.VerbosityOption()); CommonOptions.VerbosityOption());
} }
} }

View file

@ -24,6 +24,7 @@ namespace Microsoft.DotNet.Cli
.With(name: LocalizableStrings.OutputOption) .With(name: LocalizableStrings.OutputOption)
.ForwardAs(o => $"/p:PublishDir={o.Arguments.Single()}")), .ForwardAs(o => $"/p:PublishDir={o.Arguments.Single()}")),
CommonOptions.ConfigurationOption(), CommonOptions.ConfigurationOption(),
Create.Option(
"--filter", "--filter",
LocalizableStrings.FilterProjOptionDescription, LocalizableStrings.FilterProjOptionDescription,
Accept.ExactlyOneArgument() Accept.ExactlyOneArgument()

View file

@ -11,35 +11,35 @@ namespace Microsoft.DotNet.Cli
Create.Command( Create.Command(
"test", "test",
LocalizableStrings.AppFullName, LocalizableStrings.AppFullName,
Accept.ZeroOrMoreArguments, Accept.ZeroOrMoreArguments(),
CommonOptions.HelpOption(), CommonOptions.HelpOption(),
Create.Option( Create.Option(
"-s|--settings", "-s|--settings",
LocalizableStrings.CmdSettingsDescription, LocalizableStrings.CmdSettingsDescription,
Accept.ExactlyOneArgument() Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.CmdSettingsFile) .With(name: LocalizableStrings.CmdSettingsFile)
.ForwardAs(o => $"/p:VSTestSetting={o.Arguments.Single()}")), .ForwardAs(o => $"/p:VSTestSetting={o.Arguments.Single()}")),
Create.Option( Create.Option(
"-t|--list-tests", "-t|--list-tests",
LocalizableStrings.CmdListTestsDescription, LocalizableStrings.CmdListTestsDescription,
Accept.NoArguments Accept.NoArguments()
.ForwardAs(o => "/p:VSTestListTests=true")), .ForwardAs(o => "/p:VSTestListTests=true")),
Create.Option( Create.Option(
"--filter", "--filter",
LocalizableStrings.CmdTestCaseFilterDescription, LocalizableStrings.CmdTestCaseFilterDescription,
Accept.ExactlyOneArgument() Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.CmdTestCaseFilterExpression) .With(name: LocalizableStrings.CmdTestCaseFilterExpression)
.ForwardAs(o => $"/p:VSTestTestCaseFilter={o.Arguments.Single()}")), .ForwardAs(o => $"/p:VSTestTestCaseFilter={o.Arguments.Single()}")),
Create.Option( Create.Option(
"-a|--test-adapter-path", "-a|--test-adapter-path",
LocalizableStrings.CmdTestAdapterPathDescription, LocalizableStrings.CmdTestAdapterPathDescription,
Accept.ExactlyOneArgument() Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.CmdTestAdapterPath) .With(name: LocalizableStrings.CmdTestAdapterPath)
.ForwardAs(o => $"/p:VSTestTestAdapterPath={o.Arguments.Single()}")), .ForwardAs(o => $"/p:VSTestTestAdapterPath={o.Arguments.Single()}")),
Create.Option( Create.Option(
"-l|--logger", "-l|--logger",
LocalizableStrings.CmdLoggerDescription, LocalizableStrings.CmdLoggerDescription,
Accept.ExactlyOneArgument() Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.CmdLoggerOption) .With(name: LocalizableStrings.CmdLoggerOption)
.ForwardAs(o => .ForwardAs(o =>
{ {
@ -52,19 +52,19 @@ namespace Microsoft.DotNet.Cli
Create.Option( Create.Option(
"-o|--output", "-o|--output",
LocalizableStrings.CmdOutputDescription, LocalizableStrings.CmdOutputDescription,
Accept.ExactlyOneArgument() Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.CmdOutputDir) .With(name: LocalizableStrings.CmdOutputDir)
.ForwardAs(o => $"/p:OutputPath={o.Arguments.Single()}")), .ForwardAs(o => $"/p:OutputPath={o.Arguments.Single()}")),
Create.Option( Create.Option(
"-d|--diag", "-d|--diag",
LocalizableStrings.CmdPathTologFileDescription, LocalizableStrings.CmdPathTologFileDescription,
Accept.ExactlyOneArgument() Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.CmdPathToLogFile) .With(name: LocalizableStrings.CmdPathToLogFile)
.ForwardAs(o => $"/p:VSTestDiag={o.Arguments.Single()}")), .ForwardAs(o => $"/p:VSTestDiag={o.Arguments.Single()}")),
Create.Option( Create.Option(
"--no-build", "--no-build",
LocalizableStrings.CmdNoBuildDescription, LocalizableStrings.CmdNoBuildDescription,
Accept.NoArguments Accept.NoArguments()
.ForwardAs(o => "/p:VSTestNoBuild=true")), .ForwardAs(o => "/p:VSTestNoBuild=true")),
CommonOptions.VerbosityOption()); CommonOptions.VerbosityOption());