Georg Koppen pushed to branch tor-browser-81.1.1-10.0-1 at The Tor Project / Applications / fenix
Commits: c8fea7b4 by Georg Koppen at 2020-09-25T14:30:34+00:00 Bug 40059: Use MOZ_BUILD_DATE for versionCode
At the same time we adapt MOZ_BUILD_DATE to our needs where it is actually used and not in tor-browser-build. This gives us more flexibility. See: tor-browser-build#40084.
- - - - - 0a4fbe8a by Georg Koppen at 2020-09-28T13:43:59+00:00 Merge branch 'bug_40059' into tor-browser-81.1.1-10.0-1
- - - - -
2 changed files:
- app/build.gradle - buildSrc/src/main/java/Config.kt
Changes:
===================================== app/build.gradle ===================================== @@ -679,9 +679,12 @@ ext.updateExtensionVersion = { task, extDir -> into extDir
def systemEnvBuildDate = System.getenv('MOZ_BUILD_DATE') + // MOZ_BUILD_DATE is in the YYYYMMDDHHMMSS format. Thus, we only use a + // substring of it if it is available. def values = ['version': AndroidComponents.VERSION + "." + - (systemEnvBuildDate != null ? systemEnvBuildDate : - new Date().format('MMddHHmmss'))] + (systemEnvBuildDate != null ? + systemEnvBuildDate.substring(4) : + new Date().format('MMddHHmmss'))] inputs.properties(values) expand(values) }
===================================== buildSrc/src/main/java/Config.kt ===================================== @@ -47,7 +47,7 @@ object Config { private val fennecBaseVersionCode by lazy { val format = SimpleDateFormat("YYYYMMDDHHMMSS", Locale.US) val cutoff = format.parse("20150801000000") - val build = Date() + val build = if (System.getenv("MOZ_BUILD_DATE") != null) format.parse(System.getenv("MOZ_BUILD_DATE")) else Date()
Math.floor((build.time - cutoff.time) / (1000.0 * 60.0 * 60.0)).toInt() }
View it on GitLab: https://gitlab.torproject.org/tpo/applications/fenix/-/compare/8b0f722ffcc6d...