Change in osmo-trx[master]: update git-version-gen to generate proper version numbers

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Sep 4 18:01:35 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/10759 )

Change subject: update git-version-gen to generate proper version numbers
......................................................................

update git-version-gen to generate proper version numbers

We don't want the version of the last tagged version, but the version
number uniquely representing the current HEAD.  Use the script from
libosmocore.

I suspect that this somehow got broken in commit 00d5114717040fedd443e3f723385ede434c8b39

Related: OS#3517
Change-Id: Iba3212aa417dce4240c5c27eb4f12afcd9c95e5b
---
M git-version-gen
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Pau Espin Pedrol: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



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

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iba3212aa417dce4240c5c27eb4f12afcd9c95e5b
Gerrit-Change-Number: 10759
Gerrit-PatchSet: 3
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180904/c0d37564/attachment.htm>


More information about the gerrit-log mailing list