]> git.openfabrics.org - ~aditr/compat-rdma.git/commitdiff
setlocalversion: Do not skip tagged commits
authorVladimir Sokolovsky <vlad@mellanox.com>
Wed, 14 Mar 2012 22:03:50 +0000 (00:03 +0200)
committerVladimir Sokolovsky <vlad@mellanox.com>
Wed, 14 Mar 2012 22:03:50 +0000 (00:03 +0200)
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
scripts/setlocalversion

index 076f2dba5daf881d5302efcf36740f2b8f69a420..91fff0b92849e175560a50309fe20fab5e4c31d4 100755 (executable)
@@ -19,19 +19,14 @@ cd "${1:-.}" || usage
 # Check for git and a git repo.
 if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
 
-       # If we are at a tagged commit (like "v2.6.30-rc6"), we ignore it,
-       # because this version is defined in the top level Makefile.
-       if [ -z "`git describe --exact-match 2>/dev/null`" ]; then
-
-               # If we are past a tagged commit (like "v2.6.30-rc5-302-g72357d5"),
-               # we pretty print it.
-               if atag="`git describe 2>/dev/null`"; then
-                       echo "$atag" | awk -F- '{printf(".%s", $(NF))}'
-
-               # If we don't have a tag at all we print -g{commitish}.
-               else
-                       printf '%s' $head
-               fi
+       # If we are past a tagged commit (like "v2.6.30-rc5-302-g72357d5"),
+       # we pretty print it.
+       if atag="`git describe 2>/dev/null`"; then
+               echo "$atag" | awk -F- '{printf("%s", $(NF))}'
+
+       # If we don't have a tag at all we print {commitish}.
+       else
+               printf '%s' $head
        fi
 
        # Is this git on svn?