summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2014-12-10 02:29:15 +0100
committerSlávek Banko <slavek.banko@axis.cz>2014-12-10 02:35:41 +0100
commit580cb8e6f896f9d1a565e65394da42884ad39d5c (patch)
treef77eb30c646de2937df7d82adc72a9521925ec47
parent45dd8325b7db7af5821a69ed98e072a9f96d8337 (diff)
downloadscripts-580cb8e6f896f9d1a565e65394da42884ad39d5c.tar.gz
scripts-580cb8e6f896f9d1a565e65394da42884ad39d5c.zip
create_tarball: Split initial character in tag while sorting by version
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 0a16bdf260fda53e649c7c13c2fb324614acb773)
-rwxr-xr-xcreate_tarball4
1 files changed, 3 insertions, 1 deletions
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`