On 02/11/10 22:47, Robin Bowes wrote:

> Does anyone know the appropriate callback to use, ie. something that is
> run *after* the code has ben copied to the tmp dir and *before* the
> tarball is created?

OK, replying to my own post as I had an inspiration and I think I found
the bit of the code around what I'm talking about.

Looking in lib/capistrano/recipes/deploy/strategy/copy.rb, I see that
there is:

class Copy < Base
  # Obtains a copy of the source code locally (via the #command method),
  # compresses it to a single file, copies that file to all target
  # servers, and uncompresses it on each of them into the deployment
  # directory.
  def deploy!

... # code removed

  logger.trace "compressing #{destination} to #{filename}"
  Dir.chdir(tmpdir) {
    system(compress(File.basename(destination),
    File.basename(filename)).join(" ")) }

etc.


It seems to me that I need a callback just before the destination is
compressed to filename.

Two questions: 1. am I right in my assessment of the situation? 2. Is it
possible to add a callback there?

Thanks,

R.
-- 
"Feed that ego and you starve the soul" - Colonel J.D. Wilkes
http://www.theshackshakers.com/

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to