Created
November 2, 2012 18:12
-
-
Save webframp/4003290 to your computer and use it in GitHub Desktop.
copy_cached_repo.rb
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
Chef::Log.info '** Patching deploy resource copy method to use rsync **' | |
class Chef::Provider::Deploy | |
def copy_cached_repo | |
FileUtils.mkdir_p(@new_resource.deploy_to + "/releases") | |
run_command(:command => "rsync -a --exclude '.git*' #{::File.join(@new_resource.destination, ".")}/ #{release_path}") | |
Chef::Log.info "#{@new_resource} copied the cached checkout to #{release_path} using rsync" | |
release_created(release_path) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment