From c0a364fd3895947b17fab48fb2d35ea4bdee9d9d Mon Sep 17 00:00:00 2001 From: Edwin Date: Mon, 21 Aug 2017 15:28:05 +1000 Subject: [PATCH 1/2] Allow provisional rc numbers to extend build numbers So that versions can be applied on top of each other as upgrades --- android/app/build.gradle | 4 ++-- package.json | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 4bec6ec93..1ae4db25a 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -89,9 +89,9 @@ def getAppVersion() { return packageJson["version"] } -def (appVersion, provisional) = getAppVersion().tokenize('-') +def (appVersion, provisional) = getAppVersion().tokenize('-rc') def (major, minor, patch) = appVersion.tokenize('.') -def appVersionCode = ((major.toInteger() * 1000000) + (minor.toInteger() * 1000) + patch.toInteger()) +def appVersionCode = ((major.toInteger() * 1000000000) + (minor.toInteger() * 1000000) + (patch.toInteger() * 1000) + (provisional != null ? provisional.toInteger() : 0)) android { compileSdkVersion 23 diff --git a/package.json b/package.json index fef267820..38d22ff04 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "email": "info@sussol.net" }, "name": "mSupplyMobile", - "version": "2.0.0", + "version": "must be in the format ${majorNumber}.${minorNumber}.${patchNumber}-rc${releaseCandidateNumber}", + "version": "2.0.0-rc1", "private": false, "license": "MIT", "description": "Mobile app for use with the mSupply medical inventory control software", From f12dc1e3b468fc726b77ab3c4eaaa15b0e338439 Mon Sep 17 00:00:00 2001 From: Edwin Date: Mon, 21 Aug 2017 15:48:53 +1000 Subject: [PATCH 2/2] Avoid running out of versionCodes --- android/app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 1ae4db25a..4870c9ec9 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -91,7 +91,7 @@ def getAppVersion() { def (appVersion, provisional) = getAppVersion().tokenize('-rc') def (major, minor, patch) = appVersion.tokenize('.') -def appVersionCode = ((major.toInteger() * 1000000000) + (minor.toInteger() * 1000000) + (patch.toInteger() * 1000) + (provisional != null ? provisional.toInteger() : 0)) +def appVersionCode = ((major.toInteger() * 10000000) + (minor.toInteger() * 100000) + (patch.toInteger() * 100) + (provisional != null ? provisional.toInteger() : 0)) android { compileSdkVersion 23