fix buikld

Change-Id: Id6fb8c83566aa678bb90ebb85bad4d06b2559916
diff --git a/config/common.mk b/config/common.mk
index 080d25d..2e372dd 100644
--- a/config/common.mk
+++ b/config/common.mk
@@ -100,15 +100,15 @@
 PRODUCT_BUILD_PROP_OVERRIDES += BUILD_DISPLAY_ID=IML74K
 
 ifdef CM_NIGHTLY
-    CM_VERSION :=$(PRODUCT_VERSION_MAJOR)-$(shell date +%m%d%Y)-NIGHTLY-$(PRODUCT_DEVICE)
+    CM_VERSION :=$(PRODUCT_VERSION_MAJOR)-$(shell date +%m%d%Y)-NIGHTLY-$(CM_BUILD)
 else
     ifdef CM_SNAPSHOT
-        CM_VERSION := $(PRODUCT_VERSION_MAJOR)-$(shell date +%m%d%Y)-SNAPSHOT-$(PRODUCT_DEVICE)$(CM_EXTRAVERSION)
+        CM_VERSION := $(PRODUCT_VERSION_MAJOR)-$(shell date +%m%d%Y)-SNAPSHOT-$(CM_BUILD)$(CM_EXTRAVERSION)
     else
         ifdef CM_RELEASE
-            CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(PRODUCT_DEVICE)
+            CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD)
         else
-            CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(PRODUCT_DEVICE)-KANG
+            CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD)-KANG
         endif
     endif
 endif
diff --git a/tools/squisher b/tools/squisher
index cbd154f..ce5e916 100755
--- a/tools/squisher
+++ b/tools/squisher
@@ -144,6 +144,7 @@
 	MODVERSION=`sed -n -e'/ro\.cm\.version/s/^.*=//p' $REPACK/ota/system/build.prop`
 	: ${MODVERSION:=nightly}
 	OUTFILE=$OUT/update-cm-$MODVERSION-signed.zip
+	echo MODVERSION: $MODVERSION
 else
 	OUTFILE=$OUT/update-squished.zip
 fi