osmith has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13386 )

Change subject: osmocom-list-commits.sh: fix sorting release tags
......................................................................

osmocom-list-commits.sh: fix sorting release tags

Properly sort "git ls-remote" output, which looks like:
352f32c9cffef2e5df99cd2f03368dc56c99ee23        refs/tags/0.4.0

Use / as field separator and field no 3, instead of assuming that the
string gets split automatically after the tab character (which it does
not).

Use -V (version sort) instead of numeric sort.

Change-Id: I334e684ac5109fc289b68af78165862148074ea7
---
M scripts/osmocom-list-commits.sh
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  osmith: Verified



diff --git a/scripts/osmocom-list-commits.sh b/scripts/osmocom-list-commits.sh
index d8183c6..886cb03 100755
--- a/scripts/osmocom-list-commits.sh
+++ b/scripts/osmocom-list-commits.sh
@@ -54,7 +54,7 @@
        # ...
        ret="$(git ls-remote --tags "$URL/$1")"
        ret="$(echo "$ret" | grep 'refs/tags/[0-9.]*$' || true)"
-       ret="$(echo "$ret" | sort -n -k2)"
+       ret="$(echo "$ret" | sort -V -t/ -k3)"
        ret="$(echo "$ret" | tail -n 1)"

        if [ -n "$ret" ]; then

--
To view, visit https://gerrit.osmocom.org/13386
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I334e684ac5109fc289b68af78165862148074ea7
Gerrit-Change-Number: 13386
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <[email protected]>
Gerrit-Reviewer: Daniel Willmann <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Max <[email protected]>
Gerrit-Reviewer: Pau Espin Pedrol <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>

Reply via email to