Bug 1912973 - Move MOZ_APP_MAXVERSION from old-configure to moz.configure r=glandium

Differential Revision: https://phabricator.services.mozilla.com/D219104
This commit is contained in:
serge-sans-paille 2024-08-16 14:24:44 +00:00
Родитель f9a4bcdb58
Коммит 5f88469aca
2 изменённых файлов: 23 добавлений и 20 удалений

Просмотреть файл

@ -85,6 +85,29 @@ option(
default="",
)
# Version defines
# ==============================================================
# For extensions and langpacks, we require a max version that is compatible
# across security releases. MOZ_APP_MAXVERSION is our method for doing that.
# 24.0a1 and 24.0a2 aren't affected
# 24.0 becomes 24.*
# 24.1.1 becomes 24.*
@depends(milestone.app_version, build_project)
def moz_app_maxversion(app_version, build_project):
if "a" not in app_version:
version = Version(app_version)
if build_project == "suite":
return f"{version.major}.{version.minor}.*"
else:
return f"{version.major}.*"
else:
return app_version
set_config("MOZ_APP_MAXVERSION", moz_app_maxversion)
# Code optimization
# ==============================================================

Просмотреть файл

@ -140,30 +140,10 @@ AC_SUBST(MOZ_EME_PROCESS_BUNDLEID)
# version_display.txt or version.txt in the application directory, or
# browser/config/version_display.txt.
# For extensions and langpacks, we require a max version that is compatible
# across security releases. MOZ_APP_MAXVERSION is our method for doing that.
# 24.0a1 and 24.0a2 aren't affected
# 24.0 becomes 24.*
# 24.1.1 becomes 24.*
IS_ALPHA=`echo $MOZ_APP_VERSION | grep a`
if test -z "$IS_ALPHA"; then
changequote(,)
if test "$(basename $MOZ_BUILD_APP)" = "suite"; then
MOZ_APP_MAXVERSION=`echo $MOZ_APP_VERSION | sed "s|\(^[0-9]*\.[0-9]*\).*|\1|"`.*
else
MOZ_APP_MAXVERSION=`echo $MOZ_APP_VERSION | sed "s|\(^[0-9]*\).*|\1|"`.*
fi
changequote([,])
else
MOZ_APP_MAXVERSION=$MOZ_APP_VERSION
fi
AC_SUBST(MOZ_APP_DISPLAYNAME)
AC_SUBST(MOZ_APP_PROFILE)
AC_DEFINE_UNQUOTED(MOZ_APP_UA_VERSION, "$MOZ_APP_VERSION")
AC_SUBST(MOZ_APP_MAXVERSION)
dnl Set various defines and substitutions
dnl ========================================================