mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 1441359 - Make langpack version include buildid. r=mshal
For Automated submission to AMO we need unique language pack versions for every submitted build. This will produce versions that are not valid for AMO on nightly (61.0a1buildid2018...) but that's ok, we're not ready to submit these automatically on the nightly channel yet, they do still install fine into Firefox manually. On beta/release/esr the version will however be ok for AMO "60.0buildid2018..." and will be reasonably unique per push. This patch has the intent that, outside of automation, users who don't set a buildid get a langpack version without that specified (rather than a buildid being automatically generated for them). The releng scriptworker (addonscript) that will do the publishing to AMO will additionally sanity check that the string 'buildid' is present in the version part, so we don't accidentally break this functionality in production. This patch is also intended to be uplifted to Gecko 60 to support ESR60 needs. MozReview-Commit-ID: KuvwMyD6bwd --HG-- extra : rebase_source : 04ecd87a15d5640f510b1f6123ba9467ccc4592a
This commit is contained in:
parent
d4a3a0cb26
commit
4540d3a335
@ -289,6 +289,30 @@ def parse_chrome_manifest(path, base_path, chrome_entries):
|
||||
raise Exception('Unknown type {0}'.format(entry.name))
|
||||
|
||||
|
||||
##
|
||||
# Gets the version to use in the langpack.
|
||||
#
|
||||
# This uses the env variable MOZ_BUILD_DATE if it exists to expand the version to be unique
|
||||
# in automation.
|
||||
#
|
||||
# Args:
|
||||
# min_version - Application version
|
||||
#
|
||||
# Returns:
|
||||
# str - Version to use, may include buildid
|
||||
#
|
||||
###
|
||||
def get_version_maybe_buildid(min_version):
|
||||
version = str(min_version)
|
||||
buildid = os.environ.get('MOZ_BUILD_DATE')
|
||||
if buildid and len(buildid) != 14:
|
||||
print >>sys.stderr, 'Ignoring invalid MOZ_BUILD_DATE: %s' % buildid
|
||||
buildid = None
|
||||
if buildid:
|
||||
version = version + "buildid" + buildid
|
||||
return version
|
||||
|
||||
|
||||
###
|
||||
# Generates a new web manifest dict with values specific for a language pack.
|
||||
#
|
||||
@ -375,7 +399,7 @@ def create_webmanifest(locstr, min_app_ver, max_app_ver, app_name,
|
||||
},
|
||||
'name': '{0} Language Pack'.format(defines['MOZ_LANG_TITLE']),
|
||||
'description': 'Language pack for {0} for {1}'.format(app_name, main_locale),
|
||||
'version': min_app_ver,
|
||||
'version': get_version_maybe_buildid(min_app_ver),
|
||||
'languages': {},
|
||||
'sources': {
|
||||
'browser': {
|
||||
|
Loading…
Reference in New Issue
Block a user