From cdd658462be039afdd0dcc1f0849a27a2ccbc470 Mon Sep 17 00:00:00 2001 From: Thinker Li Date: Mon, 3 Feb 2025 19:44:52 +0000 Subject: [PATCH] Bug 1945334 - Make gradle supports beta build. r=firefox-build-system-reviewers,nalexander Remove 'b[0-9]' from MOZ_APP_VERSION before computing version code. MOZ_APP_VERSION is "136.0b0" with "--as-milestone=early-beta". However, computeVersionCode() in m-c/build.gradle fails to parse it. It supports only "136.0a0" or alike. Differential Revision: https://phabricator.services.mozilla.com/D236463 --- build.gradle | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 57cdee754584..596477c4f462 100644 --- a/build.gradle +++ b/build.gradle @@ -239,10 +239,11 @@ ext.geckoBinariesOnlyIf = { task -> return true } -// Non-official versions are like "61.0a1", where "a1" is the milestone. +// Non-official versions are like "61.0a1" or "61.0b1", where "a1" and "b1" +// are the milestone. // This simply strips that off, leaving "61.0" in this example. def getAppVersionWithoutMilestone() { - return project.ext.mozconfig.substs.MOZ_APP_VERSION.replaceFirst(/a[0-9]/, "") + return project.ext.mozconfig.substs.MOZ_APP_VERSION.replaceFirst(/[ab][0-9]/, "") } // This converts MOZ_APP_VERSION into an integer