Skip to content

Instantly share code, notes, and snippets.

@hggh
Created October 17, 2012 18:21
Show Gist options
  • Save hggh/3907166 to your computer and use it in GitHub Desktop.
Save hggh/3907166 to your computer and use it in GitHub Desktop.
Capistrano recipe for repositories with sub directories
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