Esempio n. 1
0
        public static void Configure(CommandLineApplication app)
        {
            app.Name = "aistdoc";
            app.HelpOption("-?|-h|--help");

            // Register commands
            app.Command("publish", c => PublsihDocCommand.Configure(c));
            app.Command("create", c => CreateConfigCommand.Configure(c));
            app.Command("changelog", c => ChangelogCommand.Configure(c));

            Func <int> runCommandFunc = new RootCommand(app).Run;

            app.OnExecute(runCommandFunc);
        }
Esempio n. 2
0
        public static void Configure(CommandLineApplication command)
        {
            command.Description = "Creates release notes for new version tag from repository";
            command.HelpOption("-?|-h|--help");

            var projectArg = command.Argument <string>("project", "The project id")
                             .IsRequired();
            var configOp  = command.Option <string>("--config:<filename> | -c:<filename>", "Config file name", optionType: CommandOptionType.SingleOrNoValue);
            var patOp     = command.Option <string>("--pat:<token>", "The personal access token", optionType: CommandOptionType.SingleOrNoValue);
            var outputOp  = command.Option <string>("--output:<filename> | -o:<filename>", "Output file", optionType: CommandOptionType.SingleOrNoValue);
            var versionOp = command.Option <string>("--version:<version> | -v:<version>", "The version", optionType: CommandOptionType.SingleOrNoValue)
            ;
            Func <int> runCommandFunc = new ChangelogCommand(projectArg, configOp, patOp, outputOp, versionOp).Run;

            command.OnExecute(runCommandFunc);
        }