Commit 2f578d8a authored by Alexandre Roux's avatar Alexandre Roux
Browse files

Merge branch 'v1-r-5231-version-semantic' into 'v1-r'

prerelease variables to be defined before build

See merge request !103
parents c24eabe9 fb70d807
......@@ -226,13 +226,20 @@ PRODUCT_PACKAGE_OVERLAYS += \
PRODUCT_VERSION_MAJOR = 1
PRODUCT_VERSION_MINOR = 0
PRODUCT_VERSION_MAINTENANCE := 0
PRODUCT_PRERELEASE_STRING = ""
ifdef PRODUCT_PRERELEASE
ifdef PRODUCT_PRERELEASE_VERSION
PRODUCT_PRERELEASE_STRING = -$(PRODUCT_PRERELEASE).$(PRODUCT_PRERELEASE_VERSION)
else
PRODUCT_PRERELEASE_STRING = -$(PRODUCT_PRERELEASE)
endif
ifeq ($(TARGET_VENDOR_SHOW_MAINTENANCE_VERSION),true)
LINEAGE_VERSION_MAINTENANCE := $(PRODUCT_VERSION_MAINTENANCE)
else
LINEAGE_VERSION_MAINTENANCE := 0
endif
LINEAGE_VERSION_MAINTENANCE := $(PRODUCT_VERSION_MAINTENANCE)
# Set LINEAGE_BUILDTYPE from the env RELEASE_TYPE, for jenkins compat
ifndef LINEAGE_BUILDTYPE
......@@ -302,30 +309,30 @@ endif
ifeq ($(LINEAGE_BUILDTYPE), RELEASE)
ifndef TARGET_VENDOR_RELEASE_BUILD_ID
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(LINEAGE_BUILD)
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_PRERELEASE_STRING)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(LINEAGE_BUILD)
else
ifeq ($(TARGET_BUILD_VARIANT),user)
ifeq ($(LINEAGE_VERSION_MAINTENANCE),0)
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD)
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)$(PRODUCT_PRERELEASE_STRING)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD)
else
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(LINEAGE_VERSION_MAINTENANCE)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD)
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)$(PRODUCT_PRERELEASE_STRING).$(LINEAGE_VERSION_MAINTENANCE)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD)
endif
else
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(LINEAGE_BUILD)
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_PRERELEASE_STRING)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(LINEAGE_BUILD)
endif
endif
else
ifeq ($(LINEAGE_VERSION_MAINTENANCE),0)
ifeq ($(LINEAGE_VERSION_APPEND_TIME_OF_DAY),true)
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(ANDROID_LETTER)-$(shell date -u +%Y%m%d_%H%M%S)$(CI_PIPELINE_ID)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)$(PRODUCT_PRERELEASE_STRING)-$(ANDROID_LETTER)-$(shell date -u +%Y%m%d_%H%M%S)$(CI_PIPELINE_ID)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
else
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(ANDROID_LETTER)-$(shell date -u +%Y%m%d)$(CI_PIPELINE_ID)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)$(PRODUCT_PRERELEASE_STRING)-$(ANDROID_LETTER)-$(shell date -u +%Y%m%d)$(CI_PIPELINE_ID)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
endif
else
ifeq ($(LINEAGE_VERSION_APPEND_TIME_OF_DAY),true)
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(LINEAGE_VERSION_MAINTENANCE)-$(ANDROID_LETTER)-$(shell date -u +%Y%m%d_%H%M%S)$(CI_PIPELINE_ID)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(LINEAGE_VERSION_MAINTENANCE)$(PRODUCT_PRERELEASE_STRING)-$(ANDROID_LETTER)-$(shell date -u +%Y%m%d_%H%M%S)$(CI_PIPELINE_ID)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
else
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(LINEAGE_VERSION_MAINTENANCE)-$(ANDROID_LETTER)-$(shell date -u +%Y%m%d)$(CI_PIPELINE_ID)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(LINEAGE_VERSION_MAINTENANCE)$(PRODUCT_PRERELEASE_STRING)-$(ANDROID_LETTER)-$(shell date -u +%Y%m%d)$(CI_PIPELINE_ID)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
endif
endif
endif
......@@ -352,9 +359,9 @@ ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),build/target/product/security/testkey)
TARGET_VENDOR_RELEASE_BUILD_ID := $(TARGET_VENDOR_RELEASE_BUILD_ID)
endif
ifeq ($(LINEAGE_VERSION_MAINTENANCE),0)
LINEAGE_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)$(CI_PIPELINE_ID)
LINEAGE_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)$(PRODUCT_PRERELEASE_STRING)-$(TARGET_VENDOR_RELEASE_BUILD_ID)$(CI_PIPELINE_ID)
else
LINEAGE_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(LINEAGE_VERSION_MAINTENANCE)-$(TARGET_VENDOR_RELEASE_BUILD_ID)$(CI_PIPELINE_ID)-$(LINEAGE_BUILD)
LINEAGE_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(LINEAGE_VERSION_MAINTENANCE)$(PRODUCT_PRERELEASE_STRING)-$(TARGET_VENDOR_RELEASE_BUILD_ID)$(CI_PIPELINE_ID)-$(LINEAGE_BUILD)
endif
endif
endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment