cm: Add a simplified version string

Similar to the ro.build.id/ro.build.display.id distinction, and with
the same rationale; signed builds are intended to be stable by
definition, the release types have different meanings (user vs
userdebug), and the full CM version has too much duplicated information:
the device's name and build date are already present elsewhere in the
same information screen.

For signed builds, remove the duplicated information and the type,
leaving only the actual numeric version and the verbose build identifier,
turning for example "11-20140109-SNAPSHOT-HappyPonies-device" into just
"11.0-HappyPonies". If a simplified display version can't be built,
it'll be the same as the full ro.cm.version

Change-Id: I7d8cccbb3205bde710f0004df0a6bd12c39693f1
This commit is contained in:
Ricardo Cerqueira 2014-01-09 10:25:31 +00:00
parent d36677b5e0
commit 4616137915

View File

@ -295,6 +295,26 @@ PRODUCT_PROPERTY_OVERRIDES += \
-include vendor/cm-priv/keys/keys.mk -include vendor/cm-priv/keys/keys.mk
CM_DISPLAY_VERSION := $(CM_VERSION)
ifneq ($(DEFAULT_SYSTEM_DEV_CERTIFICATE),build/target/product/security/testkey)
ifneq ($(CM_BUILDTYPE), UNOFFICIAL)
ifndef TARGET_VENDOR_RELEASE_BUILD_ID
ifneq ($(CM_EXTRAVERSION),)
TARGET_VENDOR_RELEASE_BUILD_ID := $(CM_EXTRAVERSION)
else
TARGET_VENDOR_RELEASE_BUILD_ID := -$(shell date -u +%Y%m%d)
endif
else
TARGET_VENDOR_RELEASE_BUILD_ID := -$(TARGET_VENDOR_RELEASE_BUILD_ID)
endif
CM_DISPLAY_VERSION=$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)$(TARGET_VENDOR_RELEASE_BUILD_ID)
endif
endif
PRODUCT_PROPERTY_OVERRIDES += \
ro.cm.display.version=$(CM_DISPLAY_VERSION)
-include $(WORKSPACE)/hudson/image-auto-bits.mk -include $(WORKSPACE)/hudson/image-auto-bits.mk
-include vendor/cyngn/product.mk -include vendor/cyngn/product.mk