Version number bumping with grunt.
So I just got into using grunt (hey better late than never), and already I find myself stuck on one of the most simple aspects of managing a javaScript project, which is bumping the version number.
So I am having questions pop up in my mind like:
- Do I bump the number before each push to my remote?
- Do I bump the number when I start a new commit?
- Do I just automate the process of bumping the patch number, and bump the minor, and major numbers manually?
- Do I just want something that automates version number bumping, and nothing else?
- Do I even want to automate this at all?
- Am I putting to much thought into something that is very trivial?
I like to think that I have spent enough time re-inventing the wheel to earn the right to consider myself a half way decent programmer, as such if I really want to I could write my own script of course. However in the spirit of being more calculated about spending my time on things, I would like to start typing npm install a lot more if you know what I mean. So far I have found this when it comes to doing just that.
grunt-bump
|
|
This allows for everything that comes to mind with getting the job done. In my Gruntfile I have it set up like this
|
|
I have many things set to false, but for now when I do a
|
|
It will just bump the patch number, and it is clear that I can have it do a whole lot more than just that if need be. Off to a great start with grunt here moving on.