Robert-W / grunt-ftp-push

Deploy files to an FTP server as part of your Grunt workflow.
MIT License
39 stars 14 forks source link

ftp_push with more than one destination #20

Closed yonatanmn closed 9 years ago

yonatanmn commented 9 years ago

I'm using grunt-ftp-push to upload my files to server.

I'm trying to register two different tasks - BuildPushDev and BuildPush, so I tried this:

 ftp_push: {
    dev:{
        your_target: {
            options: {
                username: "xxx",
                password: "yyy",
                host: "server.com",
                dest: '/site/wwwroot/dev/'
            },
            files: [
                {
                    expand: true,
                    cwd: 'dist/assets',                            
                }
            ]
        }
    },
    prod: {
        your_target: {
             options: {
                username: "xxx",
                password: "yyy",
                host: "server.com",
                dest: '/site/wwwroot/prod/'                     
            },
            files: [
                {
                    expand: true,
                    cwd: 'dist/assets',                            
                }
            ]
        }

    }
}

grunt.registerTask('buildPush', [
'build',
'ftp_push:prod'
]);
 grunt.registerTask('buildPushDev', [
'build',
'ftp_push:dev'
]);

but it's not working: and I'm getting You did not specify all the requirements error.

What am I doing wrong - or what alternatives can I use to register different tasks here?

yonatanmn commented 9 years ago

got my answer... https://stackoverflow.com/questions/28702056/grunt-ftp-push-with-more-than-one-destination