Method: Hercules::GitHandler#deploy_branch
- Defined in:
- lib/git_handler.rb
#deploy_branch(branch = 'master') {|checkout, branch| ... } ⇒ Object
Deploys the branch. This means it exports it and removes old checkouts upon a successful completion. It also creates the links’ directory and links the checkout.
-
branch is the branch name to be deployed. Defaults to master.
54 55 56 57 58 59 60 61 62 |
# File 'lib/git_handler.rb', line 54 def deploy_branch(branch = 'master') checkout = export_branch(branch) #@todo here we must call the before deploy script yield(checkout, branch) if block_given? remove_old_checkouts branch FileUtils.rm_f("#{create_branches_dir}/#{branch}") FileUtils.ln_sf(checkout, "#{branches_path}/#{branch}") self end |