Class: Openteam::Capistrano::Tag

Inherits:
Object
  • Object
show all
Defined in:
lib/openteam/capistrano/tagging.rb

Instance Method Summary collapse

Instance Method Details

#cleanObject



11
12
13
14
15
16
# File 'lib/openteam/capistrano/tagging.rb', line 11

def clean
  get_tags
  return if rotten_tags.empty?
  `git tag -d #{rotten_tags.join(' ')}`
  `git push origin #{rotten_tags.map { |t| ":refs/tags/#{t}" }.join(' ')}`
end

#createObject



6
7
8
9
# File 'lib/openteam/capistrano/tagging.rb', line 6

def create
  `git tag -a '#{tag_name}' -m 'Deployed by #{fetch(:user)}' origin/#{fetch(:branch)}`
  `git push origin '#{tag_name}'`
end