Class: BigKeeper::GitflowOperator
- Inherits:
-
Object
- Object
- BigKeeper::GitflowOperator
- Defined in:
- lib/big_keeper/util/gitflow_operator.rb
Overview
Operator for gitflow
Instance Method Summary collapse
- #finish_release(path, release_name) ⇒ Object
- #init_git_flow(path) ⇒ Object
- #start(path, name, type) ⇒ Object
Instance Method Details
#finish_release(path, release_name) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/big_keeper/util/gitflow_operator.rb', line 28 def finish_release(path, release_name) Dir.chdir(path) do p `git checkout master` p `git merge release/#{release_name}` p `git push` p `git checkout develop` p `git merge release/#{release_name}` p `git push` p `git branch -d release/#{release_name}` end end |
#init_git_flow(path) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/big_keeper/util/gitflow_operator.rb', line 14 def init_git_flow(path) Dir.chdir(path) do clear_flag = 'Already initialized for gitflow' IO.popen('git flow init -d') do |io| io.each do |line| unless line.include? clear_flag `git push origin master` `git push origin develop` end end end end end |
#start(path, name, type) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/big_keeper/util/gitflow_operator.rb', line 6 def start(path, name, type) init_git_flow(path) Dir.chdir(path) do gitflow_type_name = GitflowType.name(type) p `git flow #{gitflow_type_name} start #{name}` end end |