Class: Helpers::Git

Inherits:
Runner show all
Defined in:
lib/git.rb

Class Method Summary collapse

Methods inherited from Runner

runcmd, runcmd_old

Class Method Details

.cmd_archive(temp_archive, opt_tag) ⇒ Object



5
6
7
# File 'lib/git.rb', line 5

def cmd_archive temp_archive, opt_tag
 "git archive --format=tar -o \"#{temp_archive}\" --prefix=/ #{opt_tag}"
end

.fetch_tagsObject



9
10
11
# File 'lib/git.rb', line 9

def fetch_tags
  runcmd ['git', 'tag']
end

.list_tags(tags) ⇒ Object



13
14
15
16
# File 'lib/git.rb', line 13

def list_tags tags
  puts "Valid tags are:"
  tags.each.map { |tag| puts "- #{tag}" }
end