XpLoDWilD | 12d3aaf | 2013-08-24 14:21:46 +0200 | [diff] [blame] | 1 | # Versioning of the ROM |
XpLoDWilD | 12d3aaf | 2013-08-24 14:21:46 +0200 | [diff] [blame] | 2 | |
| 3 | ifdef BUILDTYPE_NIGHTLY |
| 4 | ROM_BUILDTYPE := NIGHTLY |
| 5 | endif |
| 6 | ifdef BUILDTYPE_AUTOTEST |
| 7 | ROM_BUILDTYPE := AUTOTEST |
| 8 | endif |
| 9 | ifdef BUILDTYPE_EXPERIMENTAL |
| 10 | ROM_BUILDTYPE := EXPERIMENTAL |
| 11 | endif |
| 12 | ifdef BUILDTYPE_RELEASE |
| 13 | ROM_BUILDTYPE := RELEASE |
| 14 | endif |
| 15 | |
| 16 | ifndef ROM_BUILDTYPE |
| 17 | ROM_BUILDTYPE := HOMEMADE |
| 18 | endif |
| 19 | |
Jorrit Jongma | 9b7ea68 | 2013-10-17 00:00:16 +0200 | [diff] [blame] | 20 | TARGET_PRODUCT_SHORT := $(TARGET_PRODUCT) |
| 21 | TARGET_PRODUCT_SHORT := $(subst omni_,,$(TARGET_PRODUCT_SHORT)) |
| 22 | |
XpLoDWilD | 12d3aaf | 2013-08-24 14:21:46 +0200 | [diff] [blame] | 23 | # Build the final version string |
| 24 | ifdef BUILDTYPE_RELEASE |
Richard Bankole | ee7c794 | 2013-10-24 10:17:46 -0500 | [diff] [blame] | 25 | ROM_VERSION := $(PLATFORM_VERSION)-$(TARGET_PRODUCT_SHORT) |
XpLoDWilD | 12d3aaf | 2013-08-24 14:21:46 +0200 | [diff] [blame] | 26 | else |
Richard Bankole | ee7c794 | 2013-10-24 10:17:46 -0500 | [diff] [blame] | 27 | ROM_VERSION := $(PLATFORM_VERSION)-$(shell date -u +%Y%m%d)-$(TARGET_PRODUCT_SHORT)-$(ROM_BUILDTYPE) |
XpLoDWilD | 12d3aaf | 2013-08-24 14:21:46 +0200 | [diff] [blame] | 28 | endif |
| 29 | |
| 30 | # Apply it to build.prop |
| 31 | PRODUCT_PROPERTY_OVERRIDES += \ |
Jorrit Jongma | 9b7ea68 | 2013-10-17 00:00:16 +0200 | [diff] [blame] | 32 | ro.modversion=OmniROM-$(ROM_VERSION) \ |
| 33 | ro.omni.version=$(ROM_VERSION) |