Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vinyl-ftp does no upload #112

Open
mig-25 opened this issue Mar 3, 2018 · 1 comment
Open

vinyl-ftp does no upload #112

mig-25 opened this issue Mar 3, 2018 · 1 comment

Comments

@mig-25
Copy link

mig-25 commented Mar 3, 2018

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
Copy link

This is probably a duplicate of #90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants