Forum: Ruby on Rails Praise Switchtower (plus a quick question)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
capnmidnight (Guest)
on 2005-12-27 07:49
Switchtower is really cool once you get it going.  Quick question, I do
a:

% rake deploy
% rake remote_exec ACTION=symlink_pictures


...but what's the easiest way to combine the two in a single command?

Thanks
CM
Rick O. (Guest)
on 2005-12-27 08:13
(Received via mailing list)
On 12/26/05, capnmidnight <removed_email_address@domain.invalid> wrote:
> CM
Name the task after_symlink and it will be called automatically.

--
rick
http://techno-weenie.net
Jamis B. (Guest)
on 2005-12-27 17:27
(Received via mailing list)
On Dec 26, 2005, at 11:11 PM, Rick O. wrote:

>>
>> Thanks
>> CM
>
> Name the task after_symlink and it will be called automatically.

You can also invoke multiple tasks using remote_exec:

   rake remote_exec ACTION=deploy,symlink_pictures

But as Rick said, in this case, naming symlink_pictures
"after_symlink" (or creating after_symlink and calling
symlink_pictures from it) is probably the most efficient way to go.
Before ST invokes a task "foo", it first looks for a task named
"before_foo" and invokes it (if it exists). After invoking "foo", ST
looks for and invokes "after_foo". This makes it easy to add "hooks"
to customize various tasks.

- Jamis
This topic is locked and can not be replied to.