Skip to content

Instantly share code, notes, and snippets.

@webframp
Created June 12, 2012 17:43
Show Gist options
  • Save webframp/2918971 to your computer and use it in GitHub Desktop.
Save webframp/2918971 to your computer and use it in GitHub Desktop.
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 -avC --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