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 -- Posted via http://www.ruby-forum.com/.
On 12/26/05, capnmidnight <capn-vvdLmPox+z5Wk0Htik3J/w@public.gmane.org> wrote:> 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 > CMName the task after_symlink and it will be called automatically. -- rick http://techno-weenie.net
On Dec 26, 2005, at 11:11 PM, Rick Olson wrote:> On 12/26/05, capnmidnight <capn-vvdLmPox+z5Wk0Htik3J/w@public.gmane.org> wrote: >> 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 > > 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
Reasonably Related Threads
- Capistrano + symlink to a shared images directory
- [LLVMdev] Code-generation: lang=>JSON, JSON=>lang and merging into lang
- best practices for handling uploaded images and capistrano
- Symlinks in Capistrano?
- [LLVMdev] Code-generation: lang=>JSON, JSON=>lang and merging into lang