morris / vinyl-ftp

Blazing fast vinyl adapter for FTP
Other
388 stars 31 forks source link

vinyl-ftp does no upload #112

Open mig-25 opened 6 years ago

mig-25 commented 6 years ago

Hi,

I am using MacOS High Sierra with node v8.6.0. My deploy task run through but doesn't upload any files. The ftp credentials are hidden and read from a separate config.js file as suggested in this article, https://blueprintinteractive.com/blog/how-sync-local-and-server-development-gulp

I have tried also using base instead of cwd. I also read somewhere on stack overflow, that if I am running node higher then v8,

When vinyl-ftp runs on Node 8 it stops calculating the server time offset property and needs a manual timeOffset

What value should I then set for the manual timeOffset?

The site is running on a Adobe Business Catalyst server. The FTP credentials have been tested in Filezilla towards the site, and the root is /.

The following is my setup:

var gutil = require( 'gulp-util' );
var ftp = require( 'vinyl-ftp' );

var gulpftp = require('./config.js');
// Deploy Sequences
gulp.task('deploy', function() {
    console.log(gulpftp);
    var conn = ftp.create( {
        host:     gulpftp.config.host,
        user:     gulpftp.config.user,
        password: gulpftp.config.pass,
        port:     gulpftp.config.port,
        secure:   gulpftp.config.secure,
        parallel: 3,
        log:      gutil.log
    } );

    /* list all files you wish to ftp in the glob variable */
    var globs = [
        'dist/**',
        '!node_modules/**',
        '!config.js'
    ];

    // using base = '.' will transfer everything to /public_html correctly
    // turn off buffering in gulp.src for best performance

    return gulp.src( globs, { cwd: './dist/', buffer: false } )
        .pipe( conn.newer( 'kockeriet.se/' ) ) // only upload newer files
        .pipe( conn.dest( 'kockeriet.se/' ) )
        .pipe(notify("Dev site updated!"));

} );//end deploy

Thanks

jlafitte commented 5 years ago

This is probably a duplicate of #90