コード例 #1
0
ファイル: PackCommandParser.cs プロジェクト: xwyangjshb/cli
 public static Command Pack() =>
 CreateWithRestoreOptions.Command(
     "pack",
     LocalizableStrings.AppFullName,
     Accept.ZeroOrMoreArguments()
     .With(name: CommonLocalizableStrings.ProjectArgumentName,
           description: CommonLocalizableStrings.ProjectArgumentDescription),
     CommonOptions.HelpOption(),
     Create.Option(
         "-o|--output",
         LocalizableStrings.CmdOutputDirDescription,
         Accept.ExactlyOneArgument()
         .With(name: LocalizableStrings.CmdOutputDir)
         .ForwardAsSingle(o => $"-property:PackageOutputPath={CommandDirectoryContext.GetFullPath(o.Arguments.Single())}")),
     Create.Option(
         "--no-build",
         LocalizableStrings.CmdNoBuildOptionDescription,
         Accept.NoArguments().ForwardAs("-property:NoBuild=true")),
     Create.Option(
         "--include-symbols",
         LocalizableStrings.CmdIncludeSymbolsDescription,
         Accept.NoArguments().ForwardAs("-property:IncludeSymbols=true")),
     Create.Option(
         "--include-source",
         LocalizableStrings.CmdIncludeSourceDescription,
         Accept.NoArguments().ForwardAs("-property:IncludeSource=true")),
     CommonOptions.ConfigurationOption(LocalizableStrings.ConfigurationOptionDescription),
     CommonOptions.VersionSuffixOption(),
     Create.Option(
         "-s|--serviceable",
         LocalizableStrings.CmdServiceableDescription,
         Accept.NoArguments().ForwardAs("-property:Serviceable=true")),
     CommonOptions.InteractiveMsBuildForwardOption(),
     CommonOptions.NoRestoreOption(),
     CommonOptions.VerbosityOption());
コード例 #2
0
 public static Command Publish() =>
 CreateWithRestoreOptions.Command(
     "publish",
     LocalizableStrings.AppDescription,
     Accept.ZeroOrMoreArguments(),
     CommonOptions.HelpOption(),
     Create.Option(
         "-o|--output",
         LocalizableStrings.OutputOptionDescription,
         Accept.ExactlyOneArgument()
         .With(name: LocalizableStrings.OutputOption)
         .ForwardAsSingle(o => $"/p:PublishDir={o.Arguments.Single()}")),
     CommonOptions.FrameworkOption(),
     CommonOptions.RuntimeOption(),
     CommonOptions.ConfigurationOption(),
     CommonOptions.VersionSuffixOption(),
     Create.Option(
         "--manifest",
         LocalizableStrings.ManifestOptionDescription,
         Accept.OneOrMoreArguments()
         .With(name: LocalizableStrings.ManifestOption)
         .ForwardAsSingle(o => $"/p:TargetManifestFiles={string.Join("%3B", o.Arguments)}")),
     Create.Option(
         "--self-contained",
         LocalizableStrings.SelfContainedOptionDescription,
         Accept.ZeroOrOneArgument()
         .WithSuggestionsFrom("true", "false")
         .ForwardAsSingle(o =>
 {
     string value = o.Arguments.Any() ? o.Arguments.Single() : "true";
     return($"/p:SelfContained={value}");
 })),
     CommonOptions.NoRestoreOption(),
     CommonOptions.VerbosityOption());
コード例 #3
0
 public static Command Build() =>
 CreateWithRestoreOptions.Command(
     "build",
     LocalizableStrings.AppFullName,
     Accept.ZeroOrMoreArguments()
     .With(name: CommonLocalizableStrings.ProjectArgumentName,
           description: CommonLocalizableStrings.ProjectArgumentDescription),
     CommonOptions.HelpOption(),
     Create.Option(
         "-o|--output",
         LocalizableStrings.OutputOptionDescription,
         Accept.ExactlyOneArgument()
         .With(name: LocalizableStrings.OutputOptionName)
         .ForwardAsSingle(o => $"-property:OutputPath={CommandDirectoryContext.GetFullPath(o.Arguments.Single())}")),
     CommonOptions.FrameworkOption(LocalizableStrings.FrameworkOptionDescription),
     CommonOptions.ConfigurationOption(LocalizableStrings.ConfigurationOptionDescription),
     CommonOptions.RuntimeOption(LocalizableStrings.RuntimeOptionDescription),
     CommonOptions.VersionSuffixOption(),
     Create.Option(
         "--no-incremental",
         LocalizableStrings.NoIncrementalOptionDescription),
     Create.Option(
         "--no-dependencies",
         LocalizableStrings.NoDependenciesOptionDescription,
         Accept.NoArguments()
         .ForwardAs("-property:BuildProjectReferences=false")),
     CommonOptions.NoRestoreOption(),
     CommonOptions.VerbosityOption());
コード例 #4
0
 public static Command Build() =>
 CreateWithRestoreOptions.Command(
     "build",
     LocalizableStrings.AppFullName,
     Accept.ZeroOrMoreArguments()
     .With(name: CommonLocalizableStrings.CmdProjectFile,
           description:
           "The MSBuild project file to build. If a project file is not specified, MSBuild searches the current working directory for a file that has a file extension that ends in `proj` and uses that file."),
     CommonOptions.HelpOption(),
     Create.Option(
         "-o|--output",
         LocalizableStrings.OutputOptionDescription,
         Accept.ExactlyOneArgument()
         .With(name: LocalizableStrings.OutputOptionName)
         .ForwardAsSingle(o => $"-property:OutputPath={o.Arguments.Single()}")),
     CommonOptions.FrameworkOption(),
     CommonOptions.RuntimeOption(),
     CommonOptions.ConfigurationOption(),
     CommonOptions.VersionSuffixOption(),
     Create.Option(
         "--no-incremental",
         LocalizableStrings.NoIncrementialOptionDescription),
     Create.Option(
         "--no-dependencies",
         LocalizableStrings.NoDependenciesOptionDescription,
         Accept.NoArguments()
         .ForwardAs("-property:BuildProjectReferences=false")),
     CommonOptions.NoRestoreOption(),
     CommonOptions.VerbosityOption());
コード例 #5
0
ファイル: BuildCommandParser.cs プロジェクト: agocke/sdk
        public static Command GetCommand()
        {
            var command = new Command("build", LocalizableStrings.AppFullName);

            command.AddArgument(SlnOrProjectArgument);
            RestoreCommandParser.AddImplicitRestoreOptions(command, includeRuntimeOption: false, includeNoDependenciesOption: false);
            command.AddOption(CommonOptions.FrameworkOption(LocalizableStrings.FrameworkOptionDescription));
            command.AddOption(CommonOptions.ConfigurationOption(LocalizableStrings.ConfigurationOptionDescription));
            command.AddOption(RuntimeOption);
            command.AddOption(CommonOptions.VersionSuffixOption());
            command.AddOption(NoRestoreOption);
            command.AddOption(CommonOptions.InteractiveMsBuildForwardOption());
            command.AddOption(CommonOptions.VerbosityOption());
            command.AddOption(CommonOptions.DebugOption());
            command.AddOption(OutputOption);
            command.AddOption(NoIncrementalOption);
            command.AddOption(NoDependenciesOption);
            command.AddOption(NoLogoOption);
            command.AddOption(SelfContainedOption);
            command.AddOption(NoSelfContainedOption);
            command.AddOption(CommonOptions.ArchitectureOption());
            command.AddOption(CommonOptions.OperatingSystemOption());

            return(command);
        }
コード例 #6
0
 public static Command Pack() =>
 Create.Command(
     "pack",
     LocalizableStrings.AppFullName,
     Accept.ZeroOrMoreArguments(),
     CommonOptions.HelpOption(),
     Create.Option(
         "-o|--output",
         LocalizableStrings.CmdOutputDirDescription,
         Accept.ExactlyOneArgument()
         .With(name: LocalizableStrings.CmdOutputDir)
         .ForwardAsSingle(o => $"/p:PackageOutputPath={o.Arguments.Single()}")),
     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")),
     CommonOptions.ConfigurationOption(),
     CommonOptions.VersionSuffixOption(),
     Create.Option(
         "-s|--serviceable",
         LocalizableStrings.CmdServiceableDescription,
         Accept.NoArguments().ForwardAs("/p:Serviceable=true")),
     CommonOptions.VerbosityOption());
コード例 #7
0
ファイル: PublishCommandParser.cs プロジェクト: jmarolf/sdk-1
 public static Command Publish() =>
 CreateWithRestoreOptions.Command(
     "publish",
     LocalizableStrings.AppDescription,
     Accept.ZeroOrMoreArguments()
     .With(name: CommonLocalizableStrings.SolutionOrProjectArgumentName,
           description: CommonLocalizableStrings.SolutionOrProjectArgumentDescription),
     CommonOptions.HelpOption(),
     Create.Option(
         "-o|--output",
         LocalizableStrings.OutputOptionDescription,
         Accept.ExactlyOneArgument()
         .With(name: LocalizableStrings.OutputOption)
         .ForwardAsSingle(o => $"-property:PublishDir={CommandDirectoryContext.GetFullPath(o.Arguments.Single())}")),
     CommonOptions.FrameworkOption(LocalizableStrings.FrameworkOptionDescription),
     CommonOptions.RuntimeOption(LocalizableStrings.RuntimeOptionDescription),
     CommonOptions.ConfigurationOption(LocalizableStrings.ConfigurationOptionDescription),
     CommonOptions.VersionSuffixOption(),
     Create.Option(
         "--manifest",
         LocalizableStrings.ManifestOptionDescription,
         Accept.OneOrMoreArguments()
         .With(name: LocalizableStrings.ManifestOption)
         .ForwardAsSingle(o => $"-property:TargetManifestFiles={string.Join("%3B", o.Arguments.Select(CommandDirectoryContext.GetFullPath))}")),
     Create.Option(
         "--no-build",
         LocalizableStrings.NoBuildOptionDescription,
         Accept.NoArguments().ForwardAs("-property:NoBuild=true")),
     Create.Option(
         "--self-contained",
         LocalizableStrings.SelfContainedOptionDescription,
         Accept.ZeroOrOneArgument()
         .WithSuggestionsFrom("true", "false")
         .ForwardAsSingle(o =>
 {
     string value = o.Arguments.Any() ? o.Arguments.Single() : "true";
     return($"-property:SelfContained={value}");
 })),
     Create.Option(
         "--no-self-contained",
         LocalizableStrings.NoSelfContainedOptionDescription,
         Accept.NoArguments().ForwardAs("-property:SelfContained=false")),
     Create.Option(
         "--nologo",
         LocalizableStrings.CmdNoLogo,
         Accept.NoArguments()
         .ForwardAs("-nologo")),
     CommonOptions.InteractiveMsBuildForwardOption(),
     CommonOptions.NoRestoreOption(),
     CommonOptions.VerbosityOption());
コード例 #8
0
ファイル: PackCommandParser.cs プロジェクト: viniqsoares/sdk
        public static Command GetCommand()
        {
            var command = new Command("pack", LocalizableStrings.AppFullName);

            command.AddArgument(SlnOrProjectArgument);
            command.AddOption(OutputOption);
            command.AddOption(NoBuildOption);
            command.AddOption(IncludeSymbolsOption);
            command.AddOption(IncludeSourceOption);
            command.AddOption(ServiceableOption);
            command.AddOption(NoLogoOption);
            command.AddOption(CommonOptions.InteractiveMsBuildForwardOption());
            command.AddOption(NoRestoreOption);
            command.AddOption(CommonOptions.VerbosityOption());
            command.AddOption(CommonOptions.VersionSuffixOption());
            command.AddOption(CommonOptions.ConfigurationOption(LocalizableStrings.ConfigurationOptionDescription));

            return(command);
        }
コード例 #9
0
        public static Command GetCommand()
        {
            var command = new Command("publish", LocalizableStrings.AppDescription);

            command.AddArgument(SlnOrProjectArgument);
            RestoreCommandParser.AddImplicitRestoreOptions(command, includeRuntimeOption: false, includeNoDependenciesOption: true);
            command.AddOption(OuputOption);
            command.AddOption(ManifestOption);
            command.AddOption(NoBuildOption);
            command.AddOption(SelfContainedOption);
            command.AddOption(NoSelfContainedOption);
            command.AddOption(NoLogoOption);
            command.AddOption(CommonOptions.FrameworkOption(LocalizableStrings.FrameworkOptionDescription));
            command.AddOption(CommonOptions.RuntimeOption(LocalizableStrings.RuntimeOptionDescription));
            command.AddOption(CommonOptions.ConfigurationOption(LocalizableStrings.ConfigurationOptionDescription));
            command.AddOption(CommonOptions.VersionSuffixOption());
            command.AddOption(CommonOptions.InteractiveMsBuildForwardOption());
            command.AddOption(NoRestoreOption);
            command.AddOption(CommonOptions.VerbosityOption());

            return(command);
        }
コード例 #10
0
 public static Command Publish() =>
 Create.Command(
     "publish",
     LocalizableStrings.AppFullName,
     Accept.ZeroOrMoreArguments(),
     CommonOptions.HelpOption(),
     CommonOptions.FrameworkOption(),
     CommonOptions.RuntimeOption(),
     Create.Option(
         "-o|--output",
         LocalizableStrings.OutputOptionDescription,
         Accept.ExactlyOneArgument()
         .With(name: LocalizableStrings.OutputOption)
         .ForwardAsSingle(o => $"/p:PublishDir={o.Arguments.Single()}")),
     CommonOptions.ConfigurationOption(),
     CommonOptions.VersionSuffixOption(),
     Create.Option(
         "--filter",
         LocalizableStrings.FilterProjOptionDescription,
         Accept.OneOrMoreArguments()
         .With(name: LocalizableStrings.FilterProjOption)
         .ForwardAsSingle(o => $"/p:FilterProjectFiles={string.Join("%3B", o.Arguments)}")),
     CommonOptions.VerbosityOption());