2017-03-06 11:57:19 -08:00
|
|
|
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
|
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
|
2017-03-10 01:11:16 -08:00
|
|
|
using System.Linq;
|
2017-03-06 11:57:19 -08:00
|
|
|
using Microsoft.DotNet.Cli.CommandLine;
|
2017-03-10 01:11:16 -08:00
|
|
|
using LocalizableStrings = Microsoft.DotNet.Tools.Pack.LocalizableStrings;
|
2017-03-06 11:57:19 -08:00
|
|
|
|
|
|
|
namespace Microsoft.DotNet.Cli
|
|
|
|
{
|
|
|
|
internal static class PackCommandParser
|
|
|
|
{
|
|
|
|
public static Command Pack() =>
|
2017-03-10 01:11:16 -08:00
|
|
|
Create.Command(
|
|
|
|
"pack",
|
2017-03-10 18:59:32 -08:00
|
|
|
LocalizableStrings.AppFullName,
|
2017-03-10 17:52:40 -08:00
|
|
|
Accept.ZeroOrMoreArguments(),
|
2017-03-10 01:11:16 -08:00
|
|
|
CommonOptions.HelpOption(),
|
|
|
|
Create.Option(
|
|
|
|
"-o|--output",
|
|
|
|
LocalizableStrings.CmdOutputDirDescription,
|
2017-03-10 17:52:40 -08:00
|
|
|
Accept.ExactlyOneArgument()
|
2017-03-10 01:11:16 -08:00
|
|
|
.With(name: LocalizableStrings.CmdOutputDir)
|
2017-03-16 13:22:08 -07:00
|
|
|
.ForwardAsSingle(o => $"/p:PackageOutputPath={o.Arguments.Single()}")),
|
2017-03-10 17:52:40 -08:00
|
|
|
Create.Option(
|
|
|
|
"--no-build",
|
|
|
|
LocalizableStrings.CmdNoBuildOptionDescription,
|
|
|
|
Accept.NoArguments().ForwardAs("/p:NoBuild=true")),
|
|
|
|
Create.Option(
|
|
|
|
"--include-symbols",
|
|
|
|
LocalizableStrings.CmdIncludeSymbolsDescription,
|
|
|
|
Accept.NoArguments().ForwardAs("/p:IncludeSymbols=true")),
|
|
|
|
Create.Option(
|
|
|
|
"--include-source",
|
|
|
|
LocalizableStrings.CmdIncludeSourceDescription,
|
|
|
|
Accept.NoArguments().ForwardAs("/p:IncludeSource=true")),
|
2017-03-10 01:11:16 -08:00
|
|
|
CommonOptions.ConfigurationOption(),
|
|
|
|
CommonOptions.VersionSuffixOption(),
|
2017-03-10 17:52:40 -08:00
|
|
|
Create.Option(
|
|
|
|
"-s|--serviceable",
|
|
|
|
LocalizableStrings.CmdServiceableDescription,
|
|
|
|
Accept.NoArguments().ForwardAs("/p:Serviceable=true")),
|
2017-06-01 21:25:06 -07:00
|
|
|
CommonOptions.NoRestoreOption(),
|
2017-03-10 01:11:16 -08:00
|
|
|
CommonOptions.VerbosityOption());
|
2017-03-06 11:57:19 -08:00
|
|
|
}
|
|
|
|
}
|