Hi Wes,

That is a rake specific syntax, Capistrano tasks are their own type as defined
here<http://lee.hambley.name/capistrano-2.5.0/rdoc/classes/Capistrano/TaskDefinition.html>
.

You need to use the
before()<http://lee.hambley.name/capistrano-2.5.0/rdoc/classes/Capistrano/Configuration/Callbacks.html#M000479>and
after()<http://lee.hambley.name/capistrano-2.5.0/rdoc/classes/Capistrano/Configuration/Callbacks.html#M000476>callbacks
- an example follows:

before("cap_generate_draft_invoice_files", "load_fixtures")

.. or.. whichever makes more semantic sense...

after("load_fixtures", "cap_generate_draft_invoice_files")

if you have namespaces.. for example your methods might be moved into a
fixture / invoice_files namespace(s).. in which case your tasks might look
like this,

before("invoice_files:generate_draft", "fixtures:load")

.. or... again.. whichever makes more semantic sense...

after("fixtures:load", "invoice_files:generate_draft")


It's worth noting that these are a Capistrano 2.x feature, and you should
probably be thinking about upgrading to 2.5 if you don't have it already.

-- Lee Hambley

2008/10/27 Wes Gamble <[EMAIL PROTECTED]>

>
> All,
>
> I tried to set a dependency on a cap task like so:
>
> task :cap_generate_draft_invoice_files => :load_fixtures do
>
> but cap doesn't seem to like it.  This syntax is fine for plain rake tasks?
>
> Aren't cap tasks just rake tasks?
>
> How do you set  a dependency between two cap tasks?
>
> Wes
>
> >
>

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

Reply via email to