Class: CapDeployTagger::Helper

Inherits:
Object
  • Object
show all
Defined in:
lib/cap-deploy-tagger.rb

Class Method Summary collapse

Class Method Details

.git(cmd) ⇒ Object



16
17
18
# File 'lib/cap-deploy-tagger.rb', line 16

def self.git(cmd)
  `git #{cmd} 2>&1`.chomp
end

.latest_revisionObject



20
21
22
# File 'lib/cap-deploy-tagger.rb', line 20

def self.latest_revision
  git "rev-parse --short HEAD"
end

.tag(tag, stage) ⇒ Object



10
11
12
13
14
# File 'lib/cap-deploy-tagger.rb', line 10

def self.tag(tag, stage)
  git "tag -f #{tag}_#{stage}"
  git "push -f --tags"
  "#{tag}_#{stage}"
end