libcommon: Extract revision from source directory. [#METR-21516]

This commit is contained in:
Vladimir Chebotarev 2016-12-07 01:53:32 +03:00
parent 017a32c3ad
commit 93c805c7f5

View File

@ -5,6 +5,10 @@ function tag_filter {
# Get last revision number
function get_revision {
BASEDIR=`dirname "$0"`
CURDIR=`pwd`
cd ${BASEDIR}
git fetch --tags
git tag | tag_filter | tail -1 | sed 's/^v1\.1\.\(.*\)-testing$/\1/'
cd ${CURDIR}
}