]> 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:45:06 +0000 (14:45 -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 36b7ae1020bf19d2f57ffe1f6dfc4d13a30af667..985234c1a3873d672597cec0509c541cf14a273b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -245,7 +245,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