Method: Codelog::Command::Bump#run

Defined in:
lib/codelog/command/bump.rb

#run(version_type, release_date, options) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/codelog/command/bump.rb', line 13

def run(version_type, release_date, options)
  unless VALID_VERSION_TYPES.include?(version_type.downcase)
    abort(Codelog::Message::Error.invalid_version_type(version_type))
  end

  if options[:preview]
    Codelog::Command::Preview.run(next_version(version_type), release_date)
  else
    Codelog::Command::Release.run(next_version(version_type), release_date)
  end
end