Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var gulp = require('gulp');
- var GulpSSH = require('gulp-ssh');
- var config = {
- host: '...',
- port: 22,
- username: '...',
- password: '...'
- };
- var gulpSSH = new GulpSSH({
- ignoreErrors: false,
- sshConfig: config
- });
- gulp.task('upload', function () {
- return gulp.src(['file.zip'])
- .pipe(gulpSSH.sftp('write', 'test/file.zip'))
- });
- gulp.task('unzip', function () {
- return gulpSSH.exec("cd test && unzip file.zip");
- });
- cd test && -xvf file.tar
- [16:17:55] Starting 'unzip'...
- [16:17:57] gulp-ssh :: Executing :: cd test && -xvf file.tar
- [16:17:58] Finished 'unzip' after 2.68 s
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement