The ‘revCount’ attribute is the number of commits in the history of the revision. This is useful if you need a monotonically increasing version number.
The ‘gitTag’ attribute is the output of ‘git describe’, e.g. ‘v1.0.4-14-g2414721’ to indicate that the current revision is 14 commits after the tag ‘v1.0.4’.
4FWDVNWAUAFDXPXIOBOVM2ZRPZG4LLE4JBKYIXUKR45YN6MEOMXQC
CHQEG6WY44VSOTLNH5KDZWJCCHNHRUCX6BEREXUUO56VOKHNSUZAC
KQS7DSKJHTEHALCPTXMWRX2IBOVC5BWU7RWJ4GP5A2JJSBR7HPKAC
WWUOQ7V4KWGGHG22G22G6FWRHZEDLP3UZHA2C2FOMNT3UU4PFT4AC
OOQ2D3KCLFPYNAN253PHWLBQMB6OMO2KYQWQXLTP65SQAYZWQ5LAC
JTRG7RDQXKPSO4ESGDLSVAT5WIFGKDL424MN6YYCVTKCOR2FTXRQC
3XTHEUMP2ZOMPQWE3S5QWHIHCEJNEXGDPQB3JUVZFPS3RFMY455QC
# For convenience in producing readable version names, pass the
# number of commits in the history of this revision (‘revCount‘)
# and the output of git-describe (‘gitTag’).
my $revCount = `git rev-list $revision | wc -l`; chomp $revCount;
die "git rev-list failed" if $? != 0;
my $gitTag = `git describe --always $revision`; chomp $gitTag;
die "git describe failed" if $? != 0;