Closed DKunin closed 11 years ago
Hey! Where do you want to pass your comment from? From command line or from some automated interface?
Could you please explain me what exactly are you trying to do and how exactly do you want it to work. And I'll implement it
Hi there! Thanks for reply. What I want to do is the following - I want to call grunt command - "grunt pusher" for example, with a comment, perhaps like - "grunt pusher: Added some refactoring staff", and then I want to run series of commands- like git pull, gut add -A, then I want to commit with the comment I entered earlier, and then call git push, and after that for example some more grunt action like grunt bumb, to update package.json.
Thank you in advance!
Hey. Look how you can do it.
$ grunt commit --message="Commit message goes here"
Gruntfile:
var message = grunt.option('message') || '';
grunt.initConfig({
bgShell: {
commit: {
cmd: 'git commit -m "' + message +'"',
}
}
});
grunt.registerTask('commit', ['bgShell:commit']);
Please let me know if it works for you
Cheers
Oops, didn't read the documentation too carefully!
Thanks a lot - that is exactly what I needed!
Hi there, first of all - great work! I cannot imagine how I lived without it.
Quick question, say I want to automate my git commits - how can I pass a comment to the task?
Thanks in advance!