Simplify ROM filename, s/SNAPSHOT/EXPERIMENTAL/, other cleanups

* Remove "update-" prefix and "-signed" suffix.
* Replace SNAPSHOT with EXPERIMENTAL (arcee).
* If CM_EXTRAVERSION, force to type EXPERIMENTAL.
* UNOFFICIAL builds now with datestamp in the same manner as NIGHTLY.
* date -u uses UTC timezone for consistency.
* Remove some CM7 dead code.

Change-Id: I681fd92e27aaf62c50eae20265ce07c67d477bca
This commit is contained in:
Warren Togami 2012-05-06 19:49:33 -10:00
parent eac13a651f
commit 2128e2f956
2 changed files with 28 additions and 21 deletions

View File

@ -120,21 +120,33 @@ PRODUCT_VERSION_MAJOR = 9
PRODUCT_VERSION_MINOR = 0
PRODUCT_VERSION_MAINTENANCE = 0-RC0
# Set CM_BUILDTYPE
ifdef CM_NIGHTLY
CM_VERSION :=$(PRODUCT_VERSION_MAJOR)-$(shell date +%Y%m%d)-NIGHTLY-$(CM_BUILD)
else
ifdef CM_SNAPSHOT
CM_BUILDTYPE := NIGHTLY
endif
ifdef CM_EXPERIMENTAL
CM_BUILDTYPE := EXPERIMENTAL
endif
ifdef CM_RELEASE
CM_BUILDTYPE := RELEASE
endif
ifdef CM_EXTRAVERSION
# Force build type to EXPERIMENTAL
CM_BUILDTYPE := EXPERIMENTAL
# Add leading dash to CM_EXTRAVERSION
CM_EXTRAVERSION := -$(CM_EXTRAVERSION)
endif
CM_VERSION := $(PRODUCT_VERSION_MAJOR)-$(shell date +%Y%m%d)-SNAPSHOT-$(CM_BUILD)$(CM_EXTRAVERSION)
else
# If CM_BUILDTYPE is not defined, set to UNOFFICIAL
ifndef CM_BUILDTYPE
CM_BUILDTYPE := UNOFFICIAL
endif
ifdef CM_RELEASE
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)-$(CM_BUILD)-UNOFFICIAL
endif
endif
CM_VERSION := $(PRODUCT_VERSION_MAJOR)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)-$(CM_BUILD)$(CM_EXTRAVERSION)
endif
PRODUCT_PROPERTY_OVERRIDES += \

View File

@ -77,14 +77,9 @@ rm -rf $REPACK/ota/recovery
find $REPACK/ota/system/lib/modules -name "*.ko" -print0 | xargs -0 arm-eabi-strip --strip-unneeded
# Determine what to name the new signed package
if [ -z "$CYANOGEN_NIGHTLY" ]; then
MODVERSION=`sed -n -e'/ro\.cm\.version/s/^.*=//p' $REPACK/ota/system/build.prop`
: ${MODVERSION:=nightly}
OUTFILE=$OUT/update-cm-$MODVERSION-signed.zip
OUTFILE=$OUT/cm-$MODVERSION.zip
echo MODVERSION: $MODVERSION
else
OUTFILE=$OUT/update-squished.zip
fi
# Pack it up and sign
printf "Zipping package..."