Closed ghost closed 8 years ago
@Attrash-Islam gulpSSH.shell is not a writable stream. It is a readable stream. You should use it like this:
var stream = watch('target/classes/com/MAIN/*/.class')
stream.pipe(gulpSSH.dest('...'))
stream.on('data', function () {
setTime(function () {
gulpSSH.shell(['service tomcat6 restart'], {autoExit: false})
}, 2000)
})
Thanks for your replay. :) I didn't try it yet, but I will
Hi buddy, Thanks for your awesome plugin out here
I've a case where I want to copy .class files changes and then restarting tomcat6 every time there's a change
var watch = require('gulp-watch');
gulp.task('server', function () { watch('target/classes/com/MAIN/*/.class') .pipe(gulpSSH.dest('/var/lib/tomcat6/webapps/SOMEAPP/WEB-INF/classes/com/MAIN/')) .pipe(gulpSSH.shell(['service tomcat6 restart'], {autoExit: false})); });
I see that for every change the gulpSSH.dest is working just fine, but the gulpSSH.shell is working only once and not injected for the next times even when changes happens!
Can you help me with that please?
Thanks, Kind Regards