Joe:

I was able to get everything working properly, the big thing that
immediately comes to mind was that at that point in the execution
(when it's doing the initial :sets), #{latest_release} was undefined.

When you're ready to actually run a drush command in your task you
could be able to just do a

run "cd #{latest_release}/public && #{drush_cmd} <command>"

Provided you have a :drush_command variable set.

HTH,

-Tim

We can only see a short distance ahead, but we can see plenty there
that needs to be done.  --Alan Turing, 1950



On Thu, Mar 25, 2010 at 3:33 PM, joe <[email protected]> wrote:
> Tim,
>
> I don't know if you got stuff straightened out, but I'm trying
> something kind of similar to what your doing, but without different
> stages.  I'm also receiving the same error you are.  In my case, the
> error is caused by the drush_wd variable.
>
> When I remove "set :drush_wd, "#{latest_release}/blah", it works.
> Actually, if I just remove #{latest_release} it works.  It doesn't
> seem to like that #{latest_release}.
>
> Don't know if this is something you've run into, but I thought I'd
> mention it anyway.  Plus it's annoying me :P
>
> - Joe
>
> On Mar 17, 9:30 am, TStackhouse <[email protected]> wrote:
>> Rafa:
>>
>> That's exactly what I'm trying to do, I have a set of tasks that are
>> common to all stages that I'd like to have shared.  Thanks for the
>> link, I'll look over what you're doing and hopefully I'll be able to
>> duplicate it.
>>
>> -Tim
>>
>> On Mar 16, 6:44 pm, "Rafael G." <[email protected]> wrote:
>>
>> > TStackhouse wrote:
>> > > Hi all,
>>
>> > > I was discussing this in the chat room and lhambley/tsal recommended I
>> > > bring it up to the list.
>>
>> > > Basically I'm working on streamlining a multistage deploy script that
>> > > I wrote for a project to be more general  and have less redundant
>> > > code.  To that end, I'm trying to consolidate as many tasks as
>> > > possible out of my staging.rb and production.rb recipes.
>>
>> > > I tried using a common file and `load`ing them into each of the
>> > > stages, but it didn't even see my tasks there.  I also tried putting
>> > > that load into my capfile instead, but I only get greeted with a "no
>> > > servers found to match {:once=>true, :pty=>true}" message.
>>
>> > > Here's the details:
>>
>> > > ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
>> > > Capistrano v2.5.14
>>
>> > > File structure:
>> > > * Capfile
>> > > * config/
>> > > ** common.rb
>> > > ** deploy.rb
>> > > ** deploy/
>> > > *** production.rb
>> > > *** staging.rb
>>
>> > > Capfile, deploy.rb, production.staging.rb:http://pastie.org/872741
>> > > common.rb:http://pastie.org/872748
>>
>> > > This is still very much a work in progress, so there's a little cruft
>> > > in there, but any help would be greatly appreciated.
>>
>> > > -Tim
>>
>> > Hi Tim,
>>
>> >    I don't know If I understood you correctly, I think you want to share
>> > task between stages.
>> > Personally I prefer to load common tasks file from deploy.rb. (you're
>> > doing it in Capfile before config/deploy). I guess there is not problem
>> > with it.
>>
>> >    Your problem about see the tasks is produced because none of the
>> > tasks has description. If no description tasks are not shown in the list.
>>
>> > I have a generic template[1] that share tasks between stages.
>>
>> > Regards
>>
>> > [1]http://github.com/rgo/capistrano-generic-template
>>
>> > --
>> > Rafa
>
> --
> * 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.com/group/capistrano?hl=en
>
> To unsubscribe from this group, send email to 
> capistrano+unsubscribegooglegroups.com or reply to this email with the words 
> "REMOVE ME" as the subject.
>

-- 
* 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.com/group/capistrano?hl=en

To unsubscribe from this group, send email to 
capistrano+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to