[PATCH] osmo-trx[master]: git-version-gen: Take into account tags not in master

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Wed May 2 18:19:48 UTC 2018


Review at  https://gerrit.osmocom.org/7984

git-version-gen: Take into account tags not in master

Latest tag 0.3.0 was created in a release branch instead of master. As a
result, git describe doesn't show them. Let's instead reuse git command used in
osmo-ci to get latest tag from tag list when OBS latest repository is
built.

Change-Id: I3e461d4270b5e6d4c42126df4deef5651dca1e27
---
M git-version-gen
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/84/7984/1

diff --git a/git-version-gen b/git-version-gen
index 42cf3d2..51d4bf7 100755
--- a/git-version-gen
+++ b/git-version-gen
@@ -93,8 +93,7 @@
 then
     : # use $v
 elif
-       v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
-	  || git describe --abbrev=4 HEAD 2>/dev/null` \
+       v=`git tag -l --sort=v:refname | grep "^[0-9]*.[0-9]*.[0-9]*$" | tail -n 1 2>/dev/null` \
     && case $v in
 	 [0-9]*) ;;
 	 v[0-9]*) ;;

-- 
To view, visit https://gerrit.osmocom.org/7984
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e461d4270b5e6d4c42126df4deef5651dca1e27
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list