summaryrefslogtreecommitdiffstats
path: root/create_tarball
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>2015-12-16 22:12:39 +0100
commit8cf95ae5ad4ca81aec934fe914577c9690a63970 (patch)
tree9ea43622e8e7bf0ba5bde20c08a18544905b0642 /create_tarball
parent337d014ddd46c8d1e0305fdedb62952e74106854 (diff)
downloadscripts-8cf95ae5ad4ca81aec934fe914577c9690a63970.tar.gz
scripts-8cf95ae5ad4ca81aec934fe914577c9690a63970.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)
Diffstat (limited to 'create_tarball')
-rwxr-xr-xcreate_tarball4
1 files changed, 3 insertions, 1 deletions
diff --git a/create_tarball b/create_tarball
index b59e8c1..a54ef0d 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`