Skip to content

Instantly share code, notes, and snippets.

@eval
Created November 5, 2010 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eval/664852 to your computer and use it in GitHub Desktop.
Save eval/664852 to your computer and use it in GitHub Desktop.
Rakefile
21:52:53 ~/tmp/remote_task
$ rake should_fail HOSTS=strato2.thinkcreate.nl
(in /home/gert/tmp/remote_task)
rsync deprecation: pass target_host:remote_path explicitly
rsync: --exclude ".git": unknown option
rsync error: syntax or usage error (code 1) at main.c(1443) [client=3.0.7]
rake aborted!
execution failed: rsync --exclude ".git" -azP --delete ./ strato2.thinkcreate.nl:/tmp
require 'rubygems'
require 'rake/remote_task'
desc 'rsyncs ./ => remote:/tmp'
remote_task :should_work do
rsync('./', '/tmp')
end
desc 'rsyncs ./ => remote:/tmp'
remote_task :should_fail do
set :rsync_flags, ['--exclude ".git"', '-azP', '--delete']
rsync('./', '/tmp')
end
desc 'rsyncs ./ => remote:/tmp'
remote_task :works do
set :rsync_flags, ['--exclude=".git"', '-azP', '--delete']
rsync('./', '/tmp')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment