Return to Snippet

Revision: 5015
at February 5, 2008 10:55 by brettarogers


Initial Code
# ==============================================================================
# DEPLOY FROM A TAG OR BRANCH
# Adds ability to deploy from trunk, tags, and branches
# credits:
# mojoDNA Research
# http://mojodna.net/2007/03/08/teach-capistrano-to-deploy-from-a-tag-or-branch/
# You can now deploy from a branch:
#   cap deploy -Sbranch=1.0
# Or from a tag:
#   cap prod deploy -Stag=1.0.6
# ==============================================================================

set :base_repository, "http://your.server/svnrepos/#{application}"
if variables[:tag]
  set :repository, "#{base_repository}/tags/#{variables[:tag]}"
elsif variables[:branch]
  set :repository, "#{base_repository}/branches/#{variables[:branch]}"
else
  set :repository, "#{base_repository}/trunk"
end

Initial URL


Initial Description


Initial Title
Deploy From Branches, Tags or Trunk (mojoDNA)

Initial Tags
textmate, rails, ruby

Initial Language
Other