]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Makefile: Fix certified version numbers
authorcmaj <chris@penguinpbx.com>
Thu, 6 Aug 2020 17:51:10 +0000 (11:51 -0600)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Fri, 14 Aug 2020 19:52:18 +0000 (14:52 -0500)
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

Makefile

index 3d11ccd472c08a32ba58c0f9774f7cb8642452b9..dd1feedec6a9678d5a40ad6b128952637c73885c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -249,7 +249,7 @@ else
 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