Class: StiDeploy::Git

Inherits:
Object
  • Object
show all
Defined in:
lib/sti_deploy/git.rb

Class Method Summary collapse

Class Method Details

.add_versionObject



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

def add_version
  `git add #{Configuration.version_path}`
end

.checkout(branch: 'master') ⇒ Object



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

def checkout(branch: 'master')
  `git checkout #{branch}`
end

.commit(message: '') ⇒ Object



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

def commit(message: '')
  `git commit -m "#{message.tr('"', '\"')}"`
end

.merge(branch: 'master') ⇒ Object



18
19
20
# File 'lib/sti_deploy/git.rb', line 18

def merge(branch: 'master')
  `git merge #{branch}`
end

.pull(branch: 'master', remote: 'origin') ⇒ Object



26
27
28
# File 'lib/sti_deploy/git.rb', line 26

def pull(branch: 'master', remote: 'origin')
  `git pull #{remote} #{branch}`
end

.push(branch: 'master', remote: 'origin') ⇒ Object



30
31
32
# File 'lib/sti_deploy/git.rb', line 30

def push(branch: 'master', remote: 'origin')
  `git push #{remote} #{branch}`
end

.push_tagsObject



34
35
36
# File 'lib/sti_deploy/git.rb', line 34

def push_tags
  `git push --tags`
end

.tag(version: '', message: '') ⇒ Object



22
23
24
# File 'lib/sti_deploy/git.rb', line 22

def tag(version: '', message: '')
  `git tag -a v#{version.to_s} -m "#{message.tr('"', '\"')}"`
end