summaryrefslogtreecommitdiff
path: root/brillo_config
diff options
context:
space:
mode:
authorSen Jiang <senj@google.com>2017-04-04 13:24:56 -0700
committerSen Jiang <senj@google.com>2017-07-12 17:53:32 -0700
commit50ffb91b12a86390c1fa13599438abb17d7c546e (patch)
tree7fd5419b42a6b5db4cd30bbda33b3e8a25dc44ac /brillo_config
parent3cd4b5a765e824f0eb2441a51cd97d4a90f17127 (diff)
downloadextras-50ffb91b12a86390c1fa13599438abb17d7c546e.tar.gz
os-release.d: set the default version to four numbers.
We will report system_version and product_version separately to Omaha, so revert back to using four numbers for version. Test: cat $OUT/system/etc/os-release.d/system_version Change-Id: Ife69a7a17d1a06cc9127540cb39f27ce4fd0c944 (cherry picked from commit d454042d764713ead2b87b78f4d2292d2d422d45)
Diffstat (limited to 'brillo_config')
-rw-r--r--brillo_config/Android.mk20
1 files changed, 8 insertions, 12 deletions
diff --git a/brillo_config/Android.mk b/brillo_config/Android.mk
index e5bb75a3..3eba5a91 100644
--- a/brillo_config/Android.mk
+++ b/brillo_config/Android.mk
@@ -47,14 +47,12 @@ LOCAL_MODULE_CLASS := FAKE
LOCAL_MODULE_PATH := $(TARGET_OUT_OEM)/$(OSRELEASED_DIRECTORY)
include $(BUILD_SYSTEM)/base_rules.mk
-# The version is set to 0 if the user did not set the actual version.
+# The version is set to 0.0.0.0 if the user did not set the actual version.
# This allows us to have a valid version number while being easy to filter.
-ifeq ($(BRILLO_PRODUCT_VERSION),)
-BRILLO_PRODUCT_VERSION := "0"
-endif
-ifeq ($(shell echo $(BRILLO_PRODUCT_VERSION) | grep -E '^[0-9]+$$'),)
+BRILLO_PRODUCT_VERSION ?= "0.0.0.0"
+ifeq ($(shell echo $(BRILLO_PRODUCT_VERSION) | grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$$'),)
$(error Invalid BRILLO_PRODUCT_VERSION "$(BRILLO_PRODUCT_VERSION)", must be \
- a single number. Example: "1")
+ four numbers separated by dots. Example: "1.2.0.0")
endif
$(LOCAL_BUILT_MODULE):
@@ -70,14 +68,12 @@ LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/$(OSRELEASED_DIRECTORY)
include $(BUILD_SYSTEM)/base_rules.mk
-# The version is set to 0.0 if the user did not set the actual version.
+# The version is set to 0.0.0 if the user did not set the actual version.
# This allows us to have a valid version number while being easy to filter.
-ifeq ($(BRILLO_SYSTEM_VERSION),)
-BRILLO_SYSTEM_VERSION := "0.0"
-endif
-ifeq ($(shell echo $(BRILLO_SYSTEM_VERSION) | grep -E '^[0-9]+\.[0-9]+$$'),)
+BRILLO_SYSTEM_VERSION ?= "0.0.0"
+ifeq ($(shell echo $(BRILLO_SYSTEM_VERSION) | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$$'),)
$(error Invalid BRILLO_SYSTEM_VERSION "$(BRILLO_SYSTEM_VERSION)", must be \
- two numbers separated by dots. Example: "1.2")
+ three numbers separated by dots. Example: "1.2.0")
endif
# Append BUILD_NUMBER if it is a number or a build timestamp otherwise.