diff options
author | Nan Zhang <nanzhang@google.com> | 2018-02-20 13:29:14 -0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2018-10-20 23:36:27 -0700 |
commit | e4c531c5eec97b483ea711accb0f0a0303d30d79 (patch) | |
tree | d20fdebb59ae8e91d335c85f1f1a103caf963735 | |
parent | b75f162a38c9a004e43a97665f92d08d4cefac99 (diff) | |
download | TV-e4c531c5eec97b483ea711accb0f0a0303d30d79.tar.gz |
Restore "Use HAS_BUILD_NUMBER to check engineering build"
And use BUILD_NUMBER_FROM_FILE instead of BUILD_NUMBER to reduce build
reruns.
This was reverted in 6a2a9219b9ea3a2a9b56acd7038c9819f8959c35
Test: m -j32
Bug: b/70351683
Change-Id: I4ac6e62c716c05b103db3a3e09ec288a46149b18
Original-Change-Id: If5eb8891920ddd0486e263dd996f21efd36677c0
-rw-r--r-- | version.mk | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -58,7 +58,7 @@ code_version_build := 001 ##################################################### ##################################################### # Collect automatic version code parameters -ifneq "" "$(filter eng.%,$(BUILD_NUMBER))" +ifeq ($(strip $(HAS_BUILD_NUMBER)),false) # This is an eng build base_version_buildtype := 0 else @@ -94,12 +94,12 @@ version_code_package := $(code_version_major)$(base_version_minor)$(code_version # and hh is the git hash # On eng builds, the BUILD_NUMBER has the user and timestamp inline ifdef TARGET_BUILD_APPS -ifneq "" "$(filter eng.%,$(BUILD_NUMBER))" +ifeq ($(strip $(HAS_BUILD_NUMBER)),false) git_hash := $(shell git --git-dir $(LOCAL_PATH)/.git log -n 1 --pretty=format:%h) date_string := $(shell date +%Y-%m-%d) version_name_package := $(base_version_major).$(base_version_minor).$(code_version_build) (eng.$(USER).$(git_hash).$(date_string)-$(base_version_arch)$(base_version_density)) else - version_name_package := $(base_version_major).$(base_version_minor).$(code_version_build) ($(BUILD_NUMBER)-$(base_version_arch)$(base_version_density)) + version_name_package := $(base_version_major).$(base_version_minor).$(code_version_build) ($(BUILD_NUMBER_FROM_FILE)-$(base_version_arch)$(base_version_density)) endif else # !TARGET_BUILD_APPS version_name_package := $(base_version_major).$(base_version_minor).$(code_version_build) |