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

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
8ddfb67db4ccc597d0106a1268016cd9?d=identicon&s=25 capnmidnight (Guest)
on 2005-12-27 06:49
Switchtower is really cool once you get it going.  Quick question, I do

% rake deploy
% rake remote_exec ACTION=symlink_pictures

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

821395fe70906c8290df7f18ac4ac6cf?d=identicon&s=25 Rick Olson (Guest)
on 2005-12-27 07:13
(Received via mailing list)
On 12/26/05, capnmidnight <> wrote:
> CM
Name the task after_symlink and it will be called automatically.

992fe8c19bbbc27f2b562a9f96efc03d?d=identicon&s=25 Jamis Buck (Guest)
on 2005-12-27 16:27
(Received via mailing list)
On Dec 26, 2005, at 11:11 PM, Rick Olson 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.