<p>osmith has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/13386">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">osmocom-list-commits.sh: fix sorting release tags<br><br>Properly sort "git ls-remote" output, which looks like:<br>352f32c9cffef2e5df99cd2f03368dc56c99ee23    refs/tags/0.4.0<br><br>Use / as field separator and field no 3, instead of assuming that the<br>string gets split automatically after the tab character (which it does<br>not).<br><br>Use -V (version sort) instead of numeric sort.<br><br>Change-Id: I334e684ac5109fc289b68af78165862148074ea7<br>---<br>M scripts/osmocom-list-commits.sh<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/86/13386/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/scripts/osmocom-list-commits.sh b/scripts/osmocom-list-commits.sh</span><br><span>index d8183c6..886cb03 100755</span><br><span>--- a/scripts/osmocom-list-commits.sh</span><br><span>+++ b/scripts/osmocom-list-commits.sh</span><br><span>@@ -54,7 +54,7 @@</span><br><span>        # ...</span><br><span>        ret="$(git ls-remote --tags "$URL/$1")"</span><br><span>  ret="$(echo "$ret" | grep 'refs/tags/[0-9.]*$' || true)"</span><br><span style="color: hsl(0, 100%, 40%);">-    ret="$(echo "$ret" | sort -n -k2)"</span><br><span style="color: hsl(120, 100%, 40%);">+        ret="$(echo "$ret" | sort -V -t/ -k3)"</span><br><span>   ret="$(echo "$ret" | tail -n 1)"</span><br><span> </span><br><span>     if [ -n "$ret" ]; then</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13386">change 13386</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/13386"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ci </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I334e684ac5109fc289b68af78165862148074ea7 </div>
<div style="display:none"> Gerrit-Change-Number: 13386 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>