Created
October 17, 2012 18:21
-
-
Save hggh/3907166 to your computer and use it in GitHub Desktop.
Capistrano recipe for repositories with sub directories
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'capistrano/recipes/deploy/strategy/remote_cache' | |
module ::Capistrano | |
module Deploy | |
module Strategy | |
class RemoteCache < Remote | |
def copy_repository_cache | |
logger.trace "copying the cached version to #{configuration[:release_path]}" | |
if copy_exclude.empty? | |
directory = File.join(repository_cache, 'symfony') | |
run "cp -RPp #{directory} #{configuration[:release_path]} && #{mark}" | |
else | |
fail "not using in my deploy.rb" | |
end | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment