diff options
author | theuni <theuni-nospam-@xbmc.org> | 2011-03-20 20:18:10 -0400 |
---|---|---|
committer | theuni <theuni-nospam-@xbmc.org> | 2011-03-20 21:05:51 -0400 |
commit | 2c260341456c3714e366d23b5a6bd2f022d7a491 (patch) | |
tree | 47a0fe8149326e2b3cb580e62aa076304cd5f592 /tools | |
parent | a0bb0dc3301bd0afc5c7adf2886b425edede27e5 (diff) |
added: gitrev-posix script so that buildbot can capture the revision string for osx/linux
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/buildbot/gitrev-posix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/buildbot/gitrev-posix b/tools/buildbot/gitrev-posix new file mode 100755 index 0000000000..9cec3d7d2b --- /dev/null +++ b/tools/buildbot/gitrev-posix @@ -0,0 +1,14 @@ +#!/bin/bash +#Print the git revision in the form yyyymmdd-abc1234 +#Note: yyyymmdd is the date that abc1234 was committed and not today's date. + +which git &>/dev/null +if [ "$?" != "0" ]; then + echo "Unknown" + exit 1 +fi +git --no-pager log --abbrev=7 -1 --pretty=format:"%h %ci" HEAD | awk '{gsub("-", "");print $2"-"$1}' 2>/dev/null +if [ "$?" != "0" ]; then + echo "Unknown" + exit 1 +fi |