capistrano/capistrano — pull request #1085 by juanibiapina (2014-06-23 19:45:50+00:00)
Title: Create release as part of publishing.

This is an approach we have been using in production for a while now. I do not propose you just outright merge this, but consider the idea instead.

With this change, the release folder gets created as part of the publishing step. This is a huge advantage to us, since it allows us to reuse the repo directory when compiling assets for instance. We also believe it is more straightforward to think of it this way.

On the other hand, this is a hack. During most of the deploy, the `release_path` will be pointing to `repo_path`, which might be misleading (if not even problematic). We need to do this because many other places will refer to `release_path` assuming it has been created before the publishing step.

A better solution could be to work on these assumptions and make everyone refer to `repo_path` until the `release_path` is actually valid (which is only during and after publishing). I would like to hear your thoughts before proceeding.