robwierzbowski / grunt-build-control

Version control your built code.
MIT License
380 stars 36 forks source link

Pass commit message via commandline #22

Open pankajparashar-zz opened 10 years ago

pankajparashar-zz commented 10 years ago

Is it possible to pass commit message via command line, while using grunt build control? The option to specify the message in the Gruntfile.js file doesn't suit my requirements.

I would need something that can dynamically use the commit message passed at runtime to commit to the remote repository.

robwierzbowski commented 10 years ago

There are a couple of ways we could do this.

Might be able to pass something in with <%= grunt.task.current.args[0] %>.

I think I'd rather add a new commit token that pulls from the main project commit. Like:

Main project commit message:

Did some stuff.

to buildcontrol:
Releasing some stuff I did.

And then in the build control commit message use %fromMain% (blah, need a better name than that) to include everything after to buildcontrol:. Would that work for you?

pankajparashar-zz commented 10 years ago

Yeah! The second option is a more strategic one and would be nice to have the main project commit as I am using this plugin with Yeoman Jekyll generator.

Meanwhile, I'll use the first method, <%= grunt.task.current.args[0] %> as the tactical approach to suffice my needs.

Thank you for the suggestions.