passing custom options to rsync
stigmergic opened this issue · 7 comments
I need to pass rsync-path in order to set the user to root, passing custom options like this doesn't work:
var gulp = require('gulp');
var rsync = require('gulp-rsync');
gulp.task('deploy', function() {
gulp.src('build/**')
.pipe(rsync({
username: 'user',
hostname: 'host',
destination: '~/',
options: {
"rsync-path": "sudo rsync"
}
}));
});
Adding the following to index.js, after line 97 (https://github.com/jerrysu/gulp-rsync/blob/master/index.js#L97) picks up the options to add to the rsync command properly.
if (options.options) {
for (var key in options.options) { config.options[key] = options.options[key]; }
}
Is there a better way to accomplish this?
I just wanted to +1 this. It works quite well!
tested on godaddy ... http://www.htpcbeginner.com/install-rsync-on-godaddy-hosting-account/
Is there anyway to include username and password? Tried to use gulp-ssh but only works on single files and I need to upload an entire folder. Site suggested rsync but need to be able to pass security info.
thank you @stigmergic this fixed my problem
This would be nice, I also need other custom options... Can someone PR this?
This feature is now included in version 0.0.7. Thank you @stigmergic for your PR. Please keep them coming 👍