From f117692aa1c7a05ce5a011a7ce48cff6baa6f92d Mon Sep 17 00:00:00 2001 From: Gabriel Luong Date: Wed, 14 Dec 2022 15:52:35 -0500 Subject: [PATCH] Bug 1805750 - Read the version name from version.txt for Focus nightly builds --- mobile/android/focus-android/buildSrc/src/main/java/Config.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mobile/android/focus-android/buildSrc/src/main/java/Config.kt b/mobile/android/focus-android/buildSrc/src/main/java/Config.kt index b8fef3aa161f..1cf0bf97cee7 100644 --- a/mobile/android/focus-android/buildSrc/src/main/java/Config.kt +++ b/mobile/android/focus-android/buildSrc/src/main/java/Config.kt @@ -3,6 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import org.gradle.api.Project +import java.io.File import java.text.SimpleDateFormat import java.util.Date import java.util.Locale @@ -30,9 +31,7 @@ object Config { @JvmStatic fun nightlyVersionName(): String { - // Nightly versions use the Gecko/A-C major version and append "0.a1", e.g. with A-C 90.0.20210426143115 - // the Nightly version will be 90.0a1 - val majorVersion = AndroidComponents.VERSION.split(".")[0] - return "$majorVersion.0a1" + // Nightly versions will use the version from "version.txt". + return File("../version.txt").useLines { it.firstOrNull() ?: "" } } } -- 2.11.4.GIT