Hi James,
Welcome to Capistrano, there isn't a common way to do this, deploying
branches is a difficult topic, and since branching works differently in
every SCM, and we support a few of them, there isn't a one-size-fits-all,
you may find that ensuring that your "released" code is a checkout copy of
the code, that you make your own task called pull_branch or something, an
implementation might look like this:

namespace :deploy do
  task :pull_branch do
     run "cd #{current_path}/ && git pull && git checkout #{ARGV[1]}"
  end
end

You might call this something like "cap deploy:pull_branch deploy-v-x.x.x"
beware that this is mostly un-supported, since there isn't a clean way to
use deploy:rollback if you hack the code in the release directory, a more
comprehensive implementation would solve these problems, but is beyond the
scope of a simple mailing list post!

-- Lee Hambley

Twitter: @leehambley
Blog: http://lee.hambley.name/
Working with Rails: http://is.gd/1s5W1


2009/7/31 James B. Byrne <[email protected]>

>
> I used Capistrano last week to make our first deployment.  Not being
> familiar with it and having made rather limited use of Git branches
> in the past I deployed from the master branch.  Immediately
> thereafter I created a deploy-v-x.x.x branch on the remote
> repository and tagged it as well.
>
> As things evolved there were a few cosmetic changes that were
> applied to the deploy-v-x.x.x branch and merged back into master.
> However, there were a lot of other development changes made to
> master since the initial deploy.
>
> You see where this is leading.  I want to move my changes made to the
> deploy-v-x.x.x branch onto the deployment server.  I can of course
> simply change deploy.rb to use deploy-v-x.x.x branch and do a new
> deploy, but this seems a bit excessive for adding a handful of one
> line changes.
>
> On the remote site I discover that there exists the master branch
> and a branch called deploy, which is the active branch.  I can log
> into the server and simply merge (pull . origin/deploy-v-x.x.x),
> which is short, sweet and to the point.  However, the question that
> I have is: what is the general practice with respect to Capistrano
> usage in these sorts of cases?  I cannot believe that I am the first
> to find myself in this situation.
>
> --
> ***          E-Mail is NOT a SECURE channel          ***
> James B. Byrne                mailto:[email protected]
> Harte & Lyne Limited          http://www.harte-lyne.ca
> 9 Brockley Drive              vox: +1 905 561 1241
> Hamilton, Ontario             fax: +1 905 561 0757
> Canada  L8E 3C3
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.co.uk/group/capistrano?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to