# Howto customize deployment with capistrano2

**URL:** <https://www.ruby-forum.com/t/howto-customize-deployment-with-capistrano2/115232>\
**Category:** Rails\
**Created:** [September 22, 2007, 2:16am UTC](https://www.ruby-forum.com/t/howto-customize-deployment-with-capistrano2/115232 "2007-09-22T02:16:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![helzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e19b73/32.png) [@helzer](https://www.ruby-forum.com/u/helzer)\
**Post date:** [September 22, 2007, 2:16am UTC](https://www.ruby-forum.com/t/howto-customize-deployment-with-capistrano2/115232/1 "2007-09-22T02:16:08Z")

</div>

My deployment requires a few extra steps after ‘update\_code’ and then  
again after ‘symlink’.  
Until I migrated to capistrano2, I had my own deploy\_with\_migration  
task which added these steps.

What would be a recommended approach to accomplish the same using  
capistrano2?

Thanks,  
Helzer

---

<div class="post-metadata">

**Author:** ![helzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e19b73/32.png) [@helzer](https://www.ruby-forum.com/u/helzer)\
**Post date:** [September 22, 2007, 2:23pm UTC](https://www.ruby-forum.com/t/howto-customize-deployment-with-capistrano2/115232/2 "2007-09-22T14:23:36Z")

</div>

helzer wrote:

> My deployment requires a few extra steps after ‘update\_code’ and then  
> again after ‘symlink’.  
> Until I migrated to capistrano2, I had my own deploy\_with\_migration  
> task which added these steps.
> 
> What would be a recommended approach to accomplish the same using  
> capistrano2?

From

[http://www.capify.org/upgrade/whats-new](http://www.capify.org/upgrade/whats-new)

" Capistrano 2 makes it easier than ever for task libraries to define  
hooks into other libraries, without worrying users clobbering their  
customizations with customizations of their own. To declare that a given  
task should execute before or after another task, simply use the before  
and after keywords:

```
before :deploy, :record_revision
after :deploy, :send_notifications

You can even define your own events, or have tasks trigger as soon 

```

as all recipes have been loaded.  
"

–Al Evans
