Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

move local cache creation to its own method

  • Loading branch information...
commit 62858499a2e67bd16aa66b721dd7f01059e164c3 1 parent 3d30635
@despo authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/capistrano/recipes/deploy/strategy/copy.rb
View
8 lib/capistrano/recipes/deploy/strategy/copy.rb
@@ -58,8 +58,7 @@ def deploy!
if File.exists?(copy_cache)
refresh_local_cache
else
- logger.debug "preparing local cache at #{copy_cache}"
- system(source.checkout(revision, copy_cache))
+ create_local_cache
end
# Check the return code of last system command and rollback if not 0
@@ -157,6 +156,11 @@ def refresh_local_cache
system(source.sync(revision, copy_cache))
end
+ def create_local_cache
+ logger.debug "preparing local cache at #{copy_cache}"
+ system(source.checkout(revision, copy_cache))
+ end
+
# Specify patterns to exclude from the copy. This is only valid
# when using a local cache.
def copy_exclude
Please sign in to comment.
Something went wrong with that request. Please try again.