/** * Adds the configuration file argument for the configured command. * @param subparser The subparser to register the argument on * @return the register argument */ protected Argument addFileArgument(Subparser subparser) { return subparser.addArgument("file") .nargs("?") .help("application configuration file"); }
public JobStopCommand(Subparser parser) { super(parser); parser.help("stop a running job without undeploying it"); hostsArg = parser.addArgument("hosts") .nargs("+") .help("The hosts to stop the job on."); tokenArg = parser.addArgument("--token") .nargs("?") .setDefault("") .help("Insecure access token"); }
public DeploymentGroupStopCommand(final Subparser parser) { super(parser); parser.help("Stop a deployment-group or abort a rolling-update"); nameArg = parser.addArgument("name") .required(true) .help("Deployment group name"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("-c", "--count") .dest("count") .type(Integer.class) .help("limit script to the specified number of pending change sets"); subparser.addArgument("-i", "--include") .action(Arguments.append()) .dest("contexts") .help("include change sets from the given context"); }
private void addHelp(ArgumentParser p) { p.addArgument("-h", "--help") .action(new SafeHelpAction(stdOut)) .help("show this help message and exit") .setDefault(Arguments.SUPPRESS); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("tag-name") .dest("tag-name") .nargs(1) .required(true) .help("The tag name"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("--confirm-delete-everything") .action(Arguments.storeTrue()) .required(true) .help("indicate you understand this deletes everything in your database"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("--migrations") .dest("migrations-file") .help("the file containing the Liquibase migrations for the application"); subparser.addArgument("--catalog") .dest("catalog") .help("Specify the database catalog (use database default if omitted)"); subparser.addArgument("--schema") .dest("schema") .help("Specify the database schema (use database default if omitted)"); }
public JobHistoryCommand(Subparser parser) { super(parser); parser.help("see the run history of a job"); jobIdArg = parser.addArgument("jobid") .help("Job id"); }
public WildcardJobCommand(final Subparser parser, final boolean shortCircuit) { super(parser, shortCircuit); jobArg = parser.addArgument("job") .help("Job id."); }
private Argument addArgument(final String... nameOrFlags) { final FeatureControl defaultControl = topLevel ? null : SUPPRESS; return globalArgs.addArgument(nameOrFlags).setDefault(defaultControl); } }
private void addCommand(Command command) { commands.put(command.getName(), command); parser.addSubparsers().help("available commands"); final Subparser subparser = parser.addSubparsers().addParser(command.getName(), false); command.configure(subparser); addHelp(subparser); subparser.description(command.getDescription()) .setDefault(COMMAND_NAME_ATTR, command.getName()) .defaultHelp(true); }
@Override public void configure(Subparser subparser) { for (AbstractLiquibaseCommand<T> subcommand : subcommands.values()) { final Subparser cmdParser = subparser.addSubparsers() .addParser(subcommand.getName()) .setDefault(COMMAND_NAME_ATTR, subcommand.getName()) .description(subcommand.getDescription()); subcommand.configure(cmdParser); } }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("-i", "--include-default") .action(Arguments.storeTrue()) .dest("include-default") .help("Also render the template with the default name"); subparser.addArgument("names").nargs("*"); }
public DeploymentGroupInspectCommand(final Subparser parser) { super(parser); parser.help("inspect a deployment group"); nameArg = parser.addArgument("name") .required(true) .help("Deployment group name"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("id").nargs(1).help("change set id"); subparser.addArgument("author").nargs(1).help("author name"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("-v", "--verbose") .action(Arguments.storeTrue()) .dest("verbose") .help("Output verbose information"); subparser.addArgument("-i", "--include") .action(Arguments.append()) .dest("contexts") .help("include change sets from the given context"); }
public DeploymentGroupRemoveCommand(final Subparser parser) { super(parser); parser.help("remove a deployment-group. Note that this does not undeploy jobs previously " + "deployed by the deployment-group"); nameArg = parser.addArgument("deployment-group-name") .required(true) .help("Deployment group name"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("output").nargs(1).help("output directory"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("-i", "--include") .action(Arguments.append()) .dest("contexts") .help("include change sets from the given context"); }