Class: OfflineDeployer::Tagger

Inherits:
Object
  • Object
show all
Defined in:
lib/offline_deployer/tagger.rb

Instance Method Summary collapse

Instance Method Details

#fetch_tagsObject



13
14
15
# File 'lib/offline_deployer/tagger.rb', line 13

def fetch_tags
  `cd #{app_root} && git fetch --tags`
end

#tag(tag_name, tag_message, commit = nil) ⇒ Object



3
4
5
6
7
# File 'lib/offline_deployer/tagger.rb', line 3

def tag(tag_name, tag_message, commit = nil)
  `git tag -a #{tag_name} -m "#{tag_message}" #{commit.presence}`
  puts "Created new tag - #{tag_name}"
  puts 'If you want to make a new release, run release maker.'
end

#tag_listObject



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

def tag_list
  `cd #{app_root} && git tag -l #{tag_list_sort}`.split("\n")
end