creatorArgParser top-level property

ArgParser get creatorArgParser

Returns the argument parser shared by the job creation commands.

CreateTaskCommand declares its own, narrower set; this one is for create job builder and create job publisher, which each add their own -P/-T on top.

  • --config or -c - File to write to (defaults to distribution.yaml)
  • --wizard or -w - Fill in the values interactively
  • --task-key or -t - The task the job belongs to
  • --name or -n - Name of the job
  • --key or -k - Key the job is addressed by, as task.key
  • --description or -d - Description text
  • --package-name or -p - Package name (auto-detected from the project)

Implementation

ArgParser get creatorArgParser => ArgParser(allowTrailingOptions: true)
  ..addOption(
    'config',
    abbr: 'c',
    help: 'Path to the configuration file.',
    defaultsTo: 'distribution.yaml',
  )
  ..addFlag(
    'wizard',
    abbr: 'w',
    help: "Fill in the values interactively.",
    defaultsTo: false,
  )
  ..addOption(
    "task-key",
    abbr: 't',
    help: "Option is used to specify the task for the command.",
  )
  ..addOption("name", abbr: 'n', help: "The name of the job to create.")
  ..addOption("key", abbr: 'k', help: "The key of the job to create.")
  ..addOption(
    "description",
    abbr: 'd',
    help: "The description of the job to create.",
  )
  ..addOption(
    "package-name",
    abbr: 'p',
    help: "Package name of the app to publish.",
    defaultsTo: BuildInfo.androidPackageName ??
        BuildInfo.iosBundleId ??
        "\${ANDROID_PACKAGE}",
  );