Permalink
Browse files

extract to create_revision_file

  • Loading branch information...
1 parent b534177 commit 7ed118a8da715c107f4afd7ec7b83145f9571c36 @despo committed Mar 16, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/capistrano/recipes/deploy/strategy/copy.rb
View
6 lib/capistrano/recipes/deploy/strategy/copy.rb
@@ -73,7 +73,7 @@ def deploy!
remove_excluded_files if copy_exclude.any?
end
- File.open(File.join(destination, "REVISION"), "w") { |f| f.puts(revision) }
+ create_revision_file
logger.trace "compressing #{destination} to #{filename}"
Dir.chdir(copy_dir) { system(compress(File.basename(destination), File.basename(filename)).join(" ")) }
@@ -173,6 +173,10 @@ def remove_excluded_files
end
end
+ def create_revision_file
+ File.open(File.join(destination, "REVISION"), "w") { |f| f.puts(revision) }
+ end
+
# Specify patterns to exclude from the copy. This is only valid
# when using a local cache.
def copy_exclude

0 comments on commit 7ed118a

Please sign in to comment.