From 7714d5d94e3cb6d3ff5e9eceaee5b131a43b0ce8 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Fri, 8 Mar 2013 11:28:11 -0600 Subject: [PATCH] build_tools/make_version: Only strip 'v' if followed by a digit. Do not want to accidentally change the tag "very_cool" to "ery_cool". Signed-off-by: Shaun Ruffell --- build_tools/make_version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/make_version b/build_tools/make_version index f880ad6..8eb2299 100755 --- a/build_tools/make_version +++ b/build_tools/make_version @@ -59,7 +59,7 @@ elif [ -d ${1}/.git ]; then MODIFIED="" SVN_REV=`git log --pretty=full -1 | grep -F "git-svn-id:" | sed -e "s/.*\@\([^\s]*\)\s.*/\1/g"` if [ -z "$SVN_REV" ]; then - VERSION=`git describe --tags --dirty=M 2> /dev/null | sed -e "s/^v//"` + VERSION=`git describe --tags --dirty=M 2> /dev/null | sed -e "s/^v\([0-9]\)/\1/"` if [ $? -ne 0 ]; then if [ "`git ls-files -m | wc -l`" != "0" ]; then MODIFIED="M"