<p>osmith has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ci/+/14649">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">common.sh: osmo_git_last_commits_tags: add "all"<br><br>Allow printing all tags instead of only the N most recent ones.<br><br>Related: OS#3870<br>Change-Id: I684c6881915831b33b679e8ae873213beb034ab7<br>---<br>M scripts/common.sh<br>1 file changed, 4 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/49/14649/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/scripts/common.sh b/scripts/common.sh</span><br><span>index 0a32c31..30ab53f 100644</span><br><span>--- a/scripts/common.sh</span><br><span>+++ b/scripts/common.sh</span><br><span>@@ -16,7 +16,7 @@</span><br><span> # Print last tags and related commits for an Osmocom git repository, e.g.:</span><br><span> # "ec798b89700dcca5c5b28edf1a1cd16ea311f30a        refs/tags/1.0.1"</span><br><span> # $1: Osmocom repository</span><br><span style="color: hsl(0, 100%, 40%);">-# $2: amount of commit, tag pairs to print (default: 1)</span><br><span style="color: hsl(120, 100%, 40%);">+# $2: amount of commit, tag pairs to print (default: 1, set to "all" to print all)</span><br><span> # $3: string to print when there are no tags (default: empty string)</span><br><span> osmo_git_last_commits_tags() {</span><br><span>    # git output:</span><br><span>@@ -31,7 +31,9 @@</span><br><span>    ret="$(git ls-remote --tags "$OSMO_GIT_URL/$1")"</span><br><span>         ret="$(echo "$ret" | grep 'refs/tags/[0-9.]*$' || true)"</span><br><span>         ret="$(echo "$ret" | sort -V -t/ -k3)"</span><br><span style="color: hsl(0, 100%, 40%);">-      ret="$(echo "$ret" | tail -n "$2")"</span><br><span style="color: hsl(120, 100%, 40%);">+     if [ "$2" != "all" ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+                ret="$(echo "$ret" | tail -n "$2")"</span><br><span style="color: hsl(120, 100%, 40%);">+     fi</span><br><span> </span><br><span>       if [ -n "$ret" ]; then</span><br><span>             echo "$ret"</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ci/+/14649">change 14649</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/c/osmo-ci/+/14649"/><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-Change-Id: I684c6881915831b33b679e8ae873213beb034ab7 </div>
<div style="display:none"> Gerrit-Change-Number: 14649 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>