Runs grunt.util.spawn()
in sequence.
grunt.initConfig({
spawn_sequence: {
git_commit:
options: {
commands: [
{
name: 'Get the name of the current branch',
cmd: 'git',
args: ['rev-parse', '--abbrev-ref', 'HEAD']
},
{
name: 'Verify that we are on the master branch and commit',
before: function (prevOutput) {
return (prevOutput === 'master')
},
cmd: 'git',
args: ['commit', '-a', '-m', 'Commit message']
}
]
}
}
}
})
MIT