inossidabile / grunt-ftpush

Grunt task for incremental code deployment over ftp
81 stars 19 forks source link

exclusions not working #34

Open gghez opened 9 years ago

gghez commented 9 years ago

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...

chrisSowerby commented 9 years ago

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!

chrisSowerby commented 9 years ago

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

janwidmer commented 9 years ago

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

chrisSowerby commented 9 years ago

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.

gghez commented 9 years ago

No answer = no support for this project

chrisSowerby commented 9 years ago

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.

janwidmer commented 9 years ago

thanks for your answers..