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:33:06 +0100
commit0a16bdf260fda53e649c7c13c2fb324614acb773 (patch)
treef77eb30c646de2937df7d82adc72a9521925ec47
parent45dd8325b7db7af5821a69ed98e072a9f96d8337 (diff)
downloadscripts-0a16bdf260fda53e649c7c13c2fb324614acb773.tar.gz
scripts-0a16bdf260fda53e649c7c13c2fb324614acb773.zip
create_tarball: Split initial character in tag while sorting by version
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-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`