Use HAS_BUILD_NUMBER to check engineering build

am: 3dd036dc99

Change-Id: I7385020f09ebcb876806cc82eca751c7f785c01c
This commit is contained in:
Nan Zhang
2018-02-22 02:21:28 +00:00
committed by android-build-merger

View File

@@ -55,7 +55,7 @@ base_version_build := 001
##################################################### #####################################################
##################################################### #####################################################
# Collect automatic version code parameters # Collect automatic version code parameters
ifneq "" "$(filter eng.%,$(BUILD_NUMBER))" ifeq ($(strip $(HAS_BUILD_NUMBER)),false)
# This is an eng build # This is an eng build
base_version_buildtype := 0 base_version_buildtype := 0
else else
@@ -106,12 +106,12 @@ version_code_package := $(base_version_major)$(base_version_minor)$(base_version
# where nnnnnn is the build number from the build server (no zero-padding) # where nnnnnn is the build number from the build server (no zero-padding)
# On eng builds, the BUILD_NUMBER has the user and timestamp inline # On eng builds, the BUILD_NUMBER has the user and timestamp inline
ifdef TARGET_BUILD_APPS 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) git_hash := $(shell git --git-dir $(LOCAL_PATH)/.git log -n 1 --pretty=format:%h)
date_string := $(shell date +%m%d%y_%H%M%S) date_string := $(shell date +%m%d%y_%H%M%S)
version_name_package := $(base_version_major).$(base_version_minor).$(base_version_build) (eng.$(USER).$(git_hash).$(date_string)-$(base_version_arch)$(base_version_density)) version_name_package := $(base_version_major).$(base_version_minor).$(base_version_build) (eng.$(USER).$(git_hash).$(date_string)-$(base_version_arch)$(base_version_density))
else else
version_name_package := $(base_version_major).$(base_version_minor).$(base_version_build) ($(BUILD_NUMBER)-$(base_version_arch)$(base_version_density)) version_name_package := $(base_version_major).$(base_version_minor).$(base_version_build) ($(BUILD_NUMBER_FROM_FILE)-$(base_version_arch)$(base_version_density))
endif endif
else # !TARGET_BUILD_APPS else # !TARGET_BUILD_APPS
version_name_package := $(base_version_major).$(base_version_minor).$(base_version_build) version_name_package := $(base_version_major).$(base_version_minor).$(base_version_build)