Class: StiDeploy::Git
- Inherits:
-
Object
- Object
- StiDeploy::Git
- Defined in:
- lib/sti_deploy/git.rb
Class Method Summary collapse
- .add_version ⇒ Object
- .checkout(branch: 'master') ⇒ Object
- .commit(message: '') ⇒ Object
- .merge(branch: 'master') ⇒ Object
- .pull(branch: 'master', remote: 'origin') ⇒ Object
- .push(branch: 'master', remote: 'origin') ⇒ Object
- .push_tags ⇒ Object
- .tag(version: '', message: '') ⇒ Object
Class Method Details
.add_version ⇒ Object
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_tags ⇒ Object
34 35 36 |
# File 'lib/sti_deploy/git.rb', line 34 def `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 |