The command used to get the previous tag on a branch is not compatible with old versions of Git:
git log HEAD --pretty=format:%d
The code looks for (tag: ***) patterns and those are not present yet in Git 1.7.12.4 on CentOS 5.
Using:
git log HEAD --pretty=oneline --decorate
instead.