From f416839b8ae6bca9f5e88aa794f4324000cd6427 Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Fri, 13 Dec 2013 11:04:14 -0600 Subject: [PATCH] vendor: support custom unofficial build tags By defining TARGET_UNOFFICIAL_BUILD_ID in a device's cm.mk, users can build custom CM builds with their own identifier in place. This adheres to CM's policy that unofficial builds must be marked as such, as both the filename and internal version will still contain the word UNOFFICIAL. Example: TARGET_UNOFFICIAL_BUILD_ID := CatEater01 results in cm-11-20131211-UNOFFICIAL-CatEater01-device(.zip) Change-Id: I61acdf4698a7fe2b35d3d5315be4b444b1b97987 --- config/common.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/common.mk b/config/common.mk index 927442de..f1f12116 100644 --- a/config/common.mk +++ b/config/common.mk @@ -272,6 +272,12 @@ else CM_EXTRAVERSION := endif +ifeq ($(CM_BUILDTYPE), UNOFFICIAL) + ifneq ($(TARGET_UNOFFICIAL_BUILD_ID),) + CM_EXTRAVERSION := "-$(TARGET_UNOFFICIAL_BUILD_ID)" + endif +endif + ifeq ($(CM_BUILDTYPE), RELEASE) ifndef TARGET_VENDOR_RELEASE_BUILD_ID CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD)