sindresorhus / grunt-shell

Run shell commands

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

templating doesn't work with array

Raketemensch opened this issue · comments

I'm trying to iterate through an array, apologies if this is just bad usage:

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

qaHosts:['ipseqa01', 'ipseqa02'],

shell : {
    qa : {
      command : 'scp -i /.ssh/id_rsa -r dist/public/* <%= qaHosts %>:/data/web/static'
    }
}

}

According to my limited understanding, "command" should be run once for each item in qaHosts, no?

No, that will just give you scp -i /.ssh/id_rsa -r dist/public/* ipseqa01, ipseqa02:/data/web/static.

Check out the grunt docs ;)