def link_current_release_to_production
converge_by(["remove existing link at #{@new_resource.current_path}",
"link release #{release_path} into production at #{@new_resource.current_path}"]) do
FileUtils.rm_f(@new_resource.current_path)
begin
FileUtils.ln_sf(release_path, @new_resource.current_path)
rescue => e
raise Chef::Exceptions::FileNotFound.new("Cannot symlink current release to production: #{e.message}")
end
Chef::Log.info "#{@new_resource} linked release #{release_path} into production at #{@new_resource.current_path}"
end
enforce_ownership
end