summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2017-07-13 05:46:38 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-07-13 05:46:38 +0000
commit80e0678406f57c05f578ce19047103dedad841c1 (patch)
tree0466fc192d0cbf607913f418155293e566746527
parent9dc8dd6de2248c457262019fc65e33d5ee089b5f (diff)
parent50ffb91b12a86390c1fa13599438abb17d7c546e (diff)
downloadextras-80e0678406f57c05f578ce19047103dedad841c1.tar.gz
Merge "os-release.d: set the default version to four numbers."
-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.