summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2011-07-14 18:11:05 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-07-14 18:11:05 -0400
commitb947974ae62111270eaee4ecae93f124e75cb738 (patch)
treec4f955243ef230a76ad1ff8dcf5504e1c4c0b350
parent3aca1c9029a9b05e9237dfdefc25f1975b824afe (diff)
downloadlongterm-queue-2.6.34-b947974ae62111270eaee4ecae93f124e75cb738.tar.gz
scripts: fix broken method for finding latest tag.
Dumping a tag list through tail -n1 breaks on the transition from .9 to .10 - code it properly so it doesn't break. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rwxr-xr-xscripts/queue-builder19
1 files changed, 11 insertions, 8 deletions
diff --git a/scripts/queue-builder b/scripts/queue-builder
index f9238ac..a89b56d 100755
--- a/scripts/queue-builder
+++ b/scripts/queue-builder
@@ -35,19 +35,22 @@ if [ ! -f $SERIES ];then
exit 1
fi
-EXTRA_VER=`git tag |grep $BASE_VER|grep -v -- -rc |tail -n1`
-if [ -z "$EXTRA_VER" ];then
+DOT=0
+while [ 1 ]; do
+ EXTRA_VER=$BASE_VER.$DOT
+ git rev-parse $BASE_VER.$[$DOT+1] > /dev/null 2>&1
+ if [ $? != 0 ]; then
+ break
+ fi
+ DOT=$[$DOT+1]
+done
+
+if [ $DOT = 0 ];then
echo failed to find tags for $BASE_VER in $PWD
echo check you are in a kernel git repo for stable
exit 1
fi
-if [ "$BASE_VER" = "$EXTRA_VER" ]; then
- echo no stable EXTRAVERSION tags found in $PWD.
- echo assuming creating 1st stable $BASE_VER.1
-fi
-
-DOT=`git show $EXTRA_VER:Makefile|grep 'EXTRAVERSION ='|awk '{print $3}'|sed 's/^\.//'`
DOT=$[$DOT+1]
# Only used in the dir name for the gse patch queue