inossidabile / grunt-ftpush

Grunt task for incremental code deployment over ftp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

exclusions not working

gghez opened this issue · comments

commented

Hi ino

I have this config section in Gruntfile.js:

    ftpush: {
            prod: {
                auth: {
                    host: 'ftp.xxxxxxxx.net',
                    port: 21,
                    authKey: 'myKey'
                },
                src: './web/',
                dest: '/www/upload/',
                exclusions: ['./web/**/.DS_Store']
            }
        },

There are a few .DS_Store files in ./web/ folder and subtree and all are sent to FTP. I don't understand why... I try delete .grunt folder as well as remote FTP folder, but still copying those MAC files...

I found the only way to do it is with globbing surrounding the file or folder names. e.g double asterisks.

or using an exact absolute url all the way from your hard drive e.g:
'C:/xampp3/htdocs/sites/sitename/wordpress/wp-content/themes/roots/.ftppass'

The main problem is that it doesn't work with ./ as you would expect!

i would post my code here but i dont know how to embed it?

Did you guys figure out how the exclusions are supposed to work? I can't make it work to exclude some files.

i ended up moving all the files that get built using grunt into there own folder. this way all the files you want to exclude will not be seen. but those excluded files might not like being away from your built files so might take a bit of reordering. i also used a sublimetext package called SFTP to upload the non build files...

however now i have moved to gulp and i think a better way of handling this is to use capistrano.

commented

No answer = no support for this project

look at capistrano tis very good. you could use grunt-shell task to make it deploy at the end after your other tasks have completed.

thanks for your answers..