From 0a16bdf260fda53e649c7c13c2fb324614acb773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Wed, 10 Dec 2014 02:29:15 +0100 Subject: create_tarball: Split initial character in tag while sorting by version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- create_tarball | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/create_tarball b/create_tarball index e2019f5..694aad3 100755 --- a/create_tarball +++ b/create_tarball @@ -85,7 +85,9 @@ fi MODULE=${SUBROOT#$TDEROOT/main/} # Calculate version -tag=`git tag | sort -t. -k 1,1nr -k 2,2nr -k 3,3nr -k 4,4nr | while read t; do \ +tag=`git tag | \ + sed "s|^\([^0-9]\)|\1.|" | sort -t. -k 1,1nr -k 2,2nr -k 3,3nr -k 4,4nr -k 5,5nr | sed "s|^\([^0-9]\)\.|\1|" | \ + while read t; do \ git branch --contains $t | cut -c 3- | grep -x "$branch" >/dev/null && \ echo "$t..HEAD" && break; done` -- cgit v1.2.1