Deploy From Branches, Tags or Trunk (mojoDNA)


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. # ==============================================================================
  2. # DEPLOY FROM A TAG OR BRANCH
  3. # Adds ability to deploy from trunk, tags, and branches
  4. # credits:
  5. # mojoDNA Research
  6. # http://mojodna.net/2007/03/08/teach-capistrano-to-deploy-from-a-tag-or-branch/
  7. # You can now deploy from a branch:
  8. # cap deploy -Sbranch=1.0
  9. # Or from a tag:
  10. # cap prod deploy -Stag=1.0.6
  11. # ==============================================================================
  12.  
  13. set :base_repository, "http://your.server/svnrepos/#{application}"
  14. if variables[:tag]
  15. set :repository, "#{base_repository}/tags/#{variables[:tag]}"
  16. elsif variables[:branch]
  17. set :repository, "#{base_repository}/branches/#{variables[:branch]}"
  18. else
  19. set :repository, "#{base_repository}/trunk"
  20. end
  21.  

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.