aboutsummaryrefslogtreecommitdiff
path: root/version.mk
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2016-09-16 14:43:52 -0700
committerDan Willemsen <dwillemsen@google.com>2016-09-16 14:56:17 -0700
commit04bf2c2a3e7303196f356bf7de8b310d7f6b5fd0 (patch)
treeed156f28a158ea6da43fd42925e6eea979ed1e63 /version.mk
parent81fc92edea136da33280627f45f89a621487b82d (diff)
downloadTV-04bf2c2a3e7303196f356bf7de8b310d7f6b5fd0.tar.gz
Don't add BUILD_NUMBER to version for platform builds
We're removing differences between two builds that have the same source. These builds will have different BUILD_NUMBERs though, so it shouldn't be embedded in the binary. For eng builds, using the current date forces the APK to be rebuilt every time the makefiles are read. Remove this for platform builds, but keep it if building unbundled. Bug: 24201956 Test: Inspect ninja file for changes between two runs Change-Id: Ib42efb54ae6c6859389eb5e81b6a6f337696d049
Diffstat (limited to 'version.mk')
-rw-r--r--version.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/version.mk b/version.mk
index e0d8cd02..49048f2a 100644
--- a/version.mk
+++ b/version.mk
@@ -87,11 +87,13 @@ base_version_density := 0
version_code_package := $(code_version_major)$(base_version_minor)$(code_version_build)$(base_version_buildtype)$(base_version_arch)$(base_version_density)
# The version name scheme for the package apk is:
+# - For platform builds: M.mm.bbb
# - For eng build (t=0): M.mm.bbb eng.$(USER)-hh-date-ad
# - For build server (t=1): M.mm.bbb (nnnnnn-ad)
# where nnnnnn is the build number from the build server (no zero-padding)
# 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))"
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)
@@ -99,6 +101,9 @@ ifneq "" "$(filter eng.%,$(BUILD_NUMBER))"
else
version_name_package := $(base_version_major).$(base_version_minor).$(code_version_build) ($(BUILD_NUMBER)-$(base_version_arch)$(base_version_density))
endif
+else # !TARGET_BUILD_APPS
+ version_name_package := $(base_version_major).$(base_version_minor).$(code_version_build)
+endif
# Cleanup the locals
code_version_major :=