rubyworks / vclog

Cross-SCM Changelog Generator
http://rubyworks.github.com/vclog
Other
11 stars 6 forks source link

Automagical Version Numbers #6

Closed trans closed 14 years ago

trans commented 14 years ago

Would be cool if vclog could generate an automagical version number based on types of changes.

trans commented 14 years ago

Yea, we now got that too. w00t w00t!

trans commented 14 years ago

Here is a note about this just for reference:

We started off by looking at what git can tell us about the current release:

Using all of this together Patrick came up with:

BRANCH=`git-describe | awk -F'-g[0-9a-fA-F]+' '{print $1}'`
COMMIT=`git-rev-parse HEAD | awk '{print substr($1,0,8)}'`
INCREMENT=`git-rev-list $BRANCH..HEAD | wc -l | awk '{print $1}'` 
TGZ="openswan-$BRANCH-($INCREMENT)-g$COMMIT.tgz"

What this attempts to achieve is create a tar ball name that describes the release using the last tag, the number of builds since the tag was made, and the short commit ID. Here is the breakdown of the bits: