Class: ThorSCMVersion::Tasks

Inherits:
Thor
  • Object
show all
Defined in:
lib/thor-scmversion.rb

Instance Method Summary collapse

Instance Method Details

#bump(type, prerelease_type = nil) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/thor-scmversion.rb', line 16

def bump(type, prerelease_type = nil)
  current_version.bump! type, prerelease_type
  begin
    say "Creating and pushing tags", :yellow
    current_version.tag
    say "Writing files: #{version_files.join(', ')}", :yellow
    write_version
    say "Tagged: #{current_version}", :green
  rescue => e
    say "Tagging #{current_version} failed due to error", :red
    say e, :red
    exit 1
  end
end

#currentObject



36
37
38
39
# File 'lib/thor-scmversion.rb', line 36

def current
  write_version(options[:version_file_path])
  say current_version.to_s
end