[Asterisk-code-review] Makefile: Fix certified version numbers (asterisk[master])

Friendly Automation asteriskteam at digium.com
Fri Aug 14 14:48:47 CDT 2020


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/14751 )

Change subject: Makefile: Fix certified version numbers
......................................................................

Makefile: Fix certified version numbers

Adds sed before awk to produce reasonable ASTERISKVERSIONNUM
on certified versions of Asterisk eg. 16.8-cert3 is 160803
instead of the previous 00800.

ASTERISK-29021 #close

Change-Id: Icf241df0ff6db09011b8c936a317a84b0b634e16
---
M Makefile
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  Kevin Harwell: Looks good to me, approved
  Friendly Automation: Approved for Submit



diff --git a/Makefile b/Makefile
index 3d11ccd..dd1feed 100644
--- a/Makefile
+++ b/Makefile
@@ -249,7 +249,7 @@
 endif
 ifneq ($(AWK),)
   ifneq ($(wildcard .version),)
-    ASTERISKVERSIONNUM:=$(shell $(AWK) -F. '{printf "%01d%02d%02d", $$1, $$2, $$3}' .version)
+    ASTERISKVERSIONNUM:=$(shell $(SED) -e 's/^certified\///' -e 's/-cert/./' .version | $(AWK) -F. '{printf "%01d%02d%02d", $$1, $$2, $$3}')
   endif
 endif
 

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14751
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Icf241df0ff6db09011b8c936a317a84b0b634e16
Gerrit-Change-Number: 14751
Gerrit-PatchSet: 2
Gerrit-Owner: cmaj <chris at penguinpbx.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200814/17886bc9/attachment.html>


More information about the asterisk-code-review mailing list