Merge pull request #6631 from eerhardt/StoreOptions

Fix dotnet store options
This commit is contained in:
Eric Erhardt 2017-05-18 21:23:47 -05:00 committed by GitHub
commit 8c1dacbe23
3 changed files with 9 additions and 10 deletions

View file

@ -21,12 +21,12 @@ namespace Microsoft.DotNet.Tools.Store
public const string SkipOptimizationOptionDescription = "Skips the optimization phase.";
public const string SkipSymbolsOptionDescription = "Skips creating symbol files which can be used for profiling the optimized assemblies.";
public const string IntermediateWorkingDirOption = "IntermediateWorkingDir";
public const string IntermediateWorkingDirOptionDescription = "The directory used by the command to execute.";
public const string PreserveIntermediateWorkingDirOptionDescription = "Preserves the intermediate working directory.";
public const string SpecifyManifests = "Specify at least one manifest with --manifest.";
public const string IntermediateDirExists = "Intermediate working directory {0} already exists. Remove {0} or specify another directory with -w.";

View file

@ -49,7 +49,6 @@ namespace Microsoft.DotNet.Cli
.With(name: LocalizableStrings.FrameworkVersionOption)
.ForwardAsSingle(o => $"/p:RuntimeFrameworkVersion={o.Arguments.Single()}")),
CommonOptions.RuntimeOption(),
CommonOptions.ConfigurationOption(),
Create.Option(
"-o|--output",
LocalizableStrings.OutputOptionDescription,
@ -62,16 +61,16 @@ namespace Microsoft.DotNet.Cli
Accept.ExactlyOneArgument()
.With(name: LocalizableStrings.IntermediateWorkingDirOption)
.ForwardAsSingle(o => $"/p:ComposeWorkingDir={o.Arguments.Single()}")),
Create.Option(
"--preserve-working-dir",
LocalizableStrings.PreserveIntermediateWorkingDirOptionDescription,
Accept.NoArguments()
.ForwardAsSingle(o => $"/p:PreserveComposeWorkingDir=true")),
Create.Option(
"--skip-optimization",
LocalizableStrings.SkipOptimizationOptionDescription,
Accept.NoArguments()
.ForwardAs("/p:SkipOptimization=true")),
Create.Option(
"--skip-symbols",
LocalizableStrings.SkipSymbolsOptionDescription,
Accept.NoArguments()
.ForwardAs("/p:CreateProfilingSymbols=false")),
CommonOptions.VerbosityOption());
}
}

View file

@ -45,7 +45,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
.WithOutput(localAssemblyCache)
.WithRuntimeFrameworkVersion(_frameworkVersion)
.WithIntermediateWorkingDirectory(intermediateWorkingDirectory)
.Execute($"--preserve-working-dir")
.Execute()
.Should().Pass();
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
@ -143,7 +143,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
.WithOutput(localAssemblyCache)
.WithRuntimeFrameworkVersion(_frameworkVersion)
.WithIntermediateWorkingDirectory(intermediateWorkingDirectory)
.Execute($"--preserve-working-dir")
.Execute()
.Should().Pass();
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";