Module: CreateGithubRelease::CommandLine

Defined in:
lib/create_github_release/command_line.rb,
lib/create_github_release/command_line/parser.rb,
lib/create_github_release/command_line/options.rb,
lib/create_github_release/command_line/validator.rb,
lib/create_github_release/command_line/validations.rb

Overview

This module has all the classes and modules for the command line interface

The Parser class is the main interface. It parses and validates the command line arguments and returns an instance of the Options class.

Examples:

parser = CreateGithubRelease::CommandLine::Parser.new
options = parser.parse(*ARGV)
if !option.valid?
  puts options.errors
  exit 1
end
# ... do something with the options

Defined Under Namespace

Modules: Validations Classes: Options, Parser, Validator

Constant Summary collapse

VALID_RELEASE_TYPES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

An array of the valid release types

Returns:

  • (Array<String>)
%w[major minor patch pre release first].freeze
VALID_REF_PATTERN =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Regex pattern for a valid git reference

Returns:

  • (Regexp)
/^(?:(?:[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*)|(?:[a-zA-Z0-9-]+))$/
ALLOWED_OPTIONS =

An array of the allowed options that can be passed to .new

Returns:

  • (Array<Symbol>)
%i[
  release_type pre pre_type default_branch release_branch remote last_release_version
  next_release_version changelog_path quiet verbose
].freeze