How to create local tasks

19 views
Skip to first unread message

Chris Williams

unread,
Dec 1, 2007, 3:12:57 AM12/1/07
to Capistrano
Is there an easy way to create a capistrano task that only runs on my
local machine?
For example, I want to write a capistrano task that first generates
an xml sitemap on my local machine, then uploads this sitemap
to each of my webservers. I know how to do the upload part, but I'm
not sure how to write a task in capistrano that only runs locally.

Thanks,
Chris

Tim Finley

unread,
Dec 1, 2007, 9:50:03 AM12/1/07
to Capistrano
I'm also interested doing local filesystem manipulation, any ideas?

Jamis Buck

unread,
Dec 1, 2007, 11:20:52 AM12/1/07
to capis...@googlegroups.com
Since a capfile is just a ruby script, you can use any of your usual
Ruby methods for executing processes, e.g. system() or backticks
(`blah`).

- Jamis

> --~--~---------~--~----~------------~-------~--~----~
> To unsubscribe from this group, send email to capistrano-
> unsub...@googlegroups.com
> For more options, visit this group at http://groups.google.com/
> group/capistrano
> -~----------~----~----~----~------~----~------~--~---
>

Tim Finley

unread,
Dec 1, 2007, 3:48:29 PM12/1/07
to Capistrano
Yea, that would be too obvious for me to consider... thanks :)

On Dec 1, 11:20 am, Jamis Buck <ja...@37signals.com> wrote:
> Since a capfile is just a ruby script, you can use any of your usual
> Ruby methods for executing processes, e.g. system() or backticks
> (`blah`).
>
> - Jamis
>
> On Dec 1, 2007, at 7:50 AM, Tim Finley wrote:
>
>
>
> > I'm also interested doing local filesystem manipulation, any ideas?
>
> > On Dec 1, 3:12 am, Chris Williams <cswilli...@gmail.com> wrote:
> >> Is there an easy way to create a capistrano task that only runs on my
> >> local machine?
> >> For example, I want to write a capistrano task that first generates
> >> an xml sitemap on my local machine, then uploads this sitemap
> >> to each of my webservers. I know how to do the upload part, but I'm
> >> not sure how to write a task in capistrano that only runs locally.
>
> >> Thanks,
> >> Chris
> > >
>
>
> smime.p7s
> 3KDownload
Reply all
Reply to author
Forward
0 new messages