version: Keep the maintenance version defined and use it if needed
* The maintenance version should not be set optionally to its official value status, but only be used when needed * Use the TARGET_VENDOR_SHOW_MAINTENANCE_VERSION := true introduced in I77c924a13122c8e1d9af14501e46bc532f7aefbd to show the value of the maintenance version in releases, with an intermediary CM_VERSION_MAINTENANCE variable Change-Id: I22b944a1d2d8586e5f3c75e19ca1c53aa3b22b59
This commit is contained in:
parent
ec6c945852
commit
3e85bf7907
@ -244,11 +244,12 @@ DEVICE_PACKAGE_OVERLAYS += vendor/cm/overlay/common
|
||||
|
||||
PRODUCT_VERSION_MAJOR = 13
|
||||
PRODUCT_VERSION_MINOR = 0
|
||||
PRODUCT_VERSION_MAINTENANCE := 1
|
||||
|
||||
ifeq ($(TARGET_VENDOR_SHOW_MAINTENANCE_VERSION),true)
|
||||
PRODUCT_VERSION_MAINTENANCE := 1
|
||||
CM_VERSION_MAINTENANCE := $(PRODUCT_VERSION_MAINTENANCE)
|
||||
else
|
||||
# 0 is ignored
|
||||
PRODUCT_VERSION_MAINTENANCE := 0
|
||||
CM_VERSION_MAINTENANCE := 0
|
||||
endif
|
||||
|
||||
# Set CM_BUILDTYPE from the env RELEASE_TYPE, for jenkins compat
|
||||
@ -304,20 +305,20 @@ ifeq ($(CM_BUILDTYPE), RELEASE)
|
||||
CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD)
|
||||
else
|
||||
ifeq ($(TARGET_BUILD_VARIANT),user)
|
||||
ifeq ($(PRODUCT_VERSION_MAINTENANCE),0)
|
||||
ifeq ($(CM_VERSION_MAINTENANCE),0)
|
||||
CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(CM_BUILD)
|
||||
else
|
||||
CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(CM_BUILD)
|
||||
CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(CM_VERSION_MAINTENANCE)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(CM_BUILD)
|
||||
endif
|
||||
else
|
||||
CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD)
|
||||
endif
|
||||
endif
|
||||
else
|
||||
ifeq ($(PRODUCT_VERSION_MAINTENANCE),0)
|
||||
ifeq ($(CM_VERSION_MAINTENANCE),0)
|
||||
CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)$(CM_EXTRAVERSION)-$(CM_BUILD)
|
||||
else
|
||||
CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)$(CM_EXTRAVERSION)-$(CM_BUILD)
|
||||
CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(CM_VERSION_MAINTENANCE)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)$(CM_EXTRAVERSION)-$(CM_BUILD)
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -345,10 +346,10 @@ ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),build/target/product/security/testkey)
|
||||
else
|
||||
TARGET_VENDOR_RELEASE_BUILD_ID := $(TARGET_VENDOR_RELEASE_BUILD_ID)
|
||||
endif
|
||||
ifeq ($(PRODUCT_VERSION_MAINTENANCE),0)
|
||||
ifeq ($(CM_VERSION_MAINTENANCE),0)
|
||||
CM_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(CM_BUILD)
|
||||
else
|
||||
CM_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(CM_BUILD)
|
||||
CM_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(CM_VERSION_MAINTENANCE)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(CM_BUILD)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user