summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2014-12-09 21:46:39 +0100
committerSlávek Banko <slavek.banko@axis.cz>2014-12-09 21:46:50 +0100
commit45dd8325b7db7af5821a69ed98e072a9f96d8337 (patch)
tree816756bf7b9db17c4d535261b3758d17094ef99f
parentc5010d9665e5d4525177093ca813846e93eba6f4 (diff)
downloadscripts-45dd8325b7db7af5821a69ed98e072a9f96d8337.tar.gz
scripts-45dd8325b7db7af5821a69ed98e072a9f96d8337.zip
create_tarball: Sort tags as version numbers instead of as textr14.0.0
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rwxr-xr-xcreate_tarball2
1 files changed, 1 insertions, 1 deletions
diff --git a/create_tarball b/create_tarball
index 939f856..e2019f5 100755
--- a/create_tarball
+++ b/create_tarball
@@ -85,7 +85,7 @@ fi
MODULE=${SUBROOT#$TDEROOT/main/}
# Calculate version
-tag=`git tag | sort -r | while read t; do \
+tag=`git tag | sort -t. -k 1,1nr -k 2,2nr -k 3,3nr -k 4,4nr | while read t; do \
git branch --contains $t | cut -c 3- | grep -x "$branch" >/dev/null && \
echo "$t..HEAD" && break; done`