File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -40,9 +40,18 @@ LOCAL_MODULE_CLASS := ETC
4040LOCAL_MODULE_PATH := $(TARGET_OUT_ETC ) /$(OSRELEASED_DIRECTORY )
4141include $(BUILD_SYSTEM ) /base_rules.mk
4242
43- # The version is set to 0.0.0 if the user did not set the actual version.
43+
44+ # The version is set to 0.0.0 if the user did not set the actual version and
45+ # a version cannot be loaded from the product cfgtree.
4446# This allows us to have a valid version number while being easy to filter.
45- BRILLO_PRODUCT_VERSION ?= "0.0.0"
47+ ifeq ($(BRILLO_PRODUCT_VERSION ) ,)
48+ # Load from file first
49+ BRILLO_PRODUCT_VERSION := $(call cfgtree-get-if-exists,brillo/product_version)
50+ endif
51+ # If the version is still empty, override it with 0.0.0
52+ ifeq ($(BRILLO_PRODUCT_VERSION ) ,)
53+ BRILLO_PRODUCT_VERSION := "0.0.0"
54+ endif
4655ifeq ($(shell echo $(BRILLO_PRODUCT_VERSION ) | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$$') ,)
4756$(error Invalid BRILLO_PRODUCT_VERSION "$(BRILLO_PRODUCT_VERSION)", must be \
4857 three numbers separated by dots. Example : "1.2.0")
You can’t perform that action at this time.
0 commit comments