Permalink
Browse files

extract code to compress_repository

  • Loading branch information...
1 parent 7ed118a commit 9e2816975fae8e81e9f3d380ecbf504755e07ff1 @despo committed Mar 16, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/capistrano/recipes/deploy/strategy/copy.rb
@@ -75,8 +75,7 @@ def deploy!
create_revision_file
- logger.trace "compressing #{destination} to #{filename}"
- Dir.chdir(copy_dir) { system(compress(File.basename(destination), File.basename(filename)).join(" ")) }
+ compress_repository
distribute!
ensure
@@ -177,6 +176,11 @@ def create_revision_file
File.open(File.join(destination, "REVISION"), "w") { |f| f.puts(revision) }
end
+ def compress_repository
+ logger.trace "compressing #{destination} to #{filename}"
+ Dir.chdir(copy_dir) { system(compress(File.basename(destination), File.basename(filename)).join(" ")) }
+ end
+
# Specify patterns to exclude from the copy. This is only valid
# when using a local cache.
def copy_exclude

0 comments on commit 9e28169

Please sign in to comment.