зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1455337 - Set min version appropriately for language packs. r=gps
AMO needs to enter the application version for every Firefox release at this time, and in doing so they don't usually enter .sec versions, as these versions are exposed to addon devs in UX where they can specify outside of the xpi what versions of Firefox they are compatible with. Language packs however set min version to things like 59.0.2 which AMO doesn't know about. AMO will also fail to validate an .xpi with an unknown min version. This code logic is slightly compounded by the fact that SeaMonkey uses these codepaths as well, so we need to account for it here. Differential Revision: https://phabricator.services.mozilla.com/D1112 --HG-- extra : rebase_source : 5bf74d235bdf651714984b7fbe0e79d2d3f61b6e extra : histedit_source : 91a49a4c0452f217d4e3de534bfdd817dd2350cc
This commit is contained in:
Родитель
5bb082d6a1
Коммит
d15902ef2b
|
@ -24,6 +24,7 @@ from mozpack.chrome.manifest import (
|
|||
ManifestLocale,
|
||||
parse_manifest,
|
||||
)
|
||||
from mozbuild.configure.util import Version
|
||||
from mozbuild.preprocessor import Preprocessor
|
||||
import buildconfig
|
||||
|
||||
|
@ -461,9 +462,20 @@ def main(args):
|
|||
|
||||
defines = parse_defines(args.defines)
|
||||
|
||||
min_app_version = args.min_app_ver
|
||||
if 'a' not in min_app_version: # Don't mangle alpha versions
|
||||
v = Version(min_app_version)
|
||||
if args.app_name == "SeaMonkey":
|
||||
# SeaMonkey is odd in that <major> hasn't changed for many years.
|
||||
# So min is <major>.<minor>.0
|
||||
min_app_version = "{}.{}.0".format(v.major, v.minor)
|
||||
else:
|
||||
# Language packs should be minversion of {major}.0
|
||||
min_app_version = "{}.0".format(v.major)
|
||||
|
||||
res = create_webmanifest(
|
||||
args.locales,
|
||||
args.min_app_ver,
|
||||
min_app_version,
|
||||
args.max_app_ver,
|
||||
args.app_name,
|
||||
args.l10n_basedir,
|
||||
|
|
Загрузка…
Ссылка в новой задаче