How do I write a script which will create a source file containing the version number? I would like the build number (4th number in the version quadruple) to be autoincremented for each commit.
I found some examples on how to use bash commands to do it:
INCREMENT=`git-rev-list $BRANCH..HEAD | wc -l | awk '{print $1}'`
but I am using Windows and I don't have a clue how to run that as a script (or a Windows batch file).
I used to work with SVN, and it worked nicely from the command prompt, so I just used it in a batch file, but I don't know how to execute git-rev-list without starting git bash.