In the begining I did the same, I wrote it by myself. But before I 
changed to this component. More or less is/do the same, as your code it 
"only" give you multistage support.

In your case only differs branch variable with this extension the result 
will be:

- File config/deploy.rb:

    set :stages, %w(production staging)
    set :default_stage, "staging"

    require 'capistrano/ext/multistage'

    # Common recipes between stages
    ...

- File config/deploy/production

    puts "*** Deploying production"
    set :branch, "origin/production"
   
    # Particular recipes for production machine
    ...

- File config/deploy/staging  

    puts "*** Deploying staging"
    set :branch, "origin/staging"
   
    # Particular recipes for staging machine
    ...


In my company staging and production machines are not the same 
(different deploy paths, branches, user, ...) then this multistage 
solution, for me, is very useful/imperative.
With your code I can't use particular recipes for diffent scenaries. 
Really I can but can be confusing.

Bye!

Scott escribió:
> I've tried multistage, but it seems just as easy and more flexible to
> do it myself.
>
> Is there something I'm missing WRT multistage and git branch handling?
>
> On Dec 14, 4:18 am, "Rafael G." <[EMAIL PROTECTED]> wrote:
>   
>> Hi Scott,
>>
>> Scott escribió:> set :repository, "/var/www/v3/git-#{application}"
>>     
>>> if ENV['DEPLOY'] == 'PRODUCTION'
>>>    puts "*** Deploying to the \033[1;41m  PRODUCTION  \033[0m
>>> servers!"
>>>    set :branch, "origin/production"
>>> else
>>>    puts "*** Deploying to the \033[1;42m  STAGING  \033[0m server!"
>>>    set :branch, "origin/staging"
>>> end
>>>       
>>> in my deploy.rb  .
>>>       
>> For this kind of things(multistage) Jamis Buck wrote a component in
>> capistrano-ext.
>> More info in this 
>> link:http://weblog.jamisbuck.org/2007/7/23/capistrano-multistage
>>
>> Regards
>>
>> --
>> Rafael Garcia Ortega
>>
>>  rgo.vcf
>> 1KDownload
>>     
>
>   


-- 
Rafael Garcia Ortega


--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

begin:vcard
fn;quoted-printable:Rafael Garc=C3=ADa Ortega
n;quoted-printable:Garc=C3=ADa Ortega;Rafael
org:ASPgems S.L.
email;internet:[EMAIL PROTECTED]
tel;work:692686533
x-mozilla-html:FALSE
url:http://www.aspgems.com
version:2.1
end:vcard

Reply via email to