From: Vladimir Sokolovsky Date: Wed, 14 Mar 2012 22:03:50 +0000 (+0200) Subject: setlocalversion: Do not skip tagged commits X-Git-Tag: vofed-3.5-x~101 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=0b36d91e63ed29fdf3abf4533161133fa5b41c7c;p=~emulex%2Ffor-vlad%2Fold%2Fcompat-rdma.git setlocalversion: Do not skip tagged commits Signed-off-by: Vladimir Sokolovsky --- diff --git a/scripts/setlocalversion b/scripts/setlocalversion index 076f2db..91fff0b 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -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?