Skip to content

Commit

Permalink
Don't add BUILD_NUMBER to version for platform builds
Browse files Browse the repository at this point in the history
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
Change-Id: I8c0ad93e817c74c69b8d8156d4727952b08024d4
  • Loading branch information
danw committed Oct 28, 2015
1 parent 2034020 commit cc3d547
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions version.mk
Expand Up @@ -100,17 +100,22 @@ endif
version_code_package := $(base_version_major)$(base_version_minor)$(base_version_build)$(base_version_buildtype)$(base_version_arch)$(base_version_density)

# The version name scheme for the package apk is:
# - For platform builds: M.m.bbb
# - For eng build (t=1): M.m.bbb eng.$(USER)-hh
# - For build server (t=0): M.m.bbb (nnnnnn-hh)
# 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
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)
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
version_name_package := $(base_version_major).$(base_version_minor).$(base_version_build) ($(BUILD_NUMBER)-$(base_version_arch)$(base_version_density))
endif
else # !TARGET_BUILD_APPS
version_name_package := $(base_version_major).$(base_version_minor).$(base_version_build)
endif

# Cleanup the locals
base_version_major :=
Expand Down

0 comments on commit cc3d547

Please sign in to comment.