summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorChirayu Desai <cdesai@cyanogenmod.org>2013-03-28 12:55:04 +0530
committerGerrit Code Review <gerrit@cyanogenmod.org>2013-04-13 05:45:36 -0700
commit724feedbd9e668e239e827b974437da85c140313 (patch)
tree6666888def28bfccc8f1e17db1db21f7ae910830 /core
parent159d99dec7656185500696f8bd48859c2ad21b5b (diff)
downloadbuild-724feedbd9e668e239e827b974437da85c140313.zip
build-724feedbd9e668e239e827b974437da85c140313.tar.gz
build-724feedbd9e668e239e827b974437da85c140313.tar.bz2
bacon: name the package correctly
The variable CM_VERSION gets updated each build, but the actual ro.cm.version in the build.prop doesn't on incremental builds. Name the 'bacon' package according to cm version from the build.prop (if it exists), so that the actual version and the name of the zip stay in sync. Change-Id: I2dacfbbf2ae418945a9b37fef2fd7cbd31510e26
Diffstat (limited to 'core')
-rw-r--r--core/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/Makefile b/core/Makefile
index 94b5561..8f1e600 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1326,7 +1326,11 @@ $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS)
--override_device=$(override_device) \
$(BUILT_TARGET_FILES_PACKAGE) $@
-CM_TARGET_PACKAGE := $(PRODUCT_OUT)/cm-$(CM_VERSION).zip
+MODVERSION := $(shell sed -n -e'/ro\.cm\.version/s/^.*=//p' $(INSTALLED_BUILD_PROP_TARGET))
+ifeq ($(MODVERSION),)
+ MODVERSION := $(CM_VERSION)
+endif
+CM_TARGET_PACKAGE := $(PRODUCT_OUT)/cm-$(MODVERSION).zip
.PHONY: otapackage bacon
otapackage: $(INTERNAL_OTA_PACKAGE_TARGET)