author | Tom Prince <mozilla@hocat.ca> |
Mon, 15 Oct 2018 21:43:21 +0000 | |
changeset 441714 | c921b0c914099ecafb250540c9e3ef1b01794ed3 |
parent 441713 | 80f7c4e29bea3f238bbf047c3fdf8e853c8c0a5d |
child 441715 | 3a4b8a6a0881ee031ce226f7a725d283e28f1137 |
push id | 34873 |
push user | dluca@mozilla.com |
push date | Wed, 17 Oct 2018 22:54:14 +0000 |
treeherder | mozilla-central@bfd23ad81ef4 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | aki |
bugs | 1497575 |
milestone | 64.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/tools/tryselect/selectors/release.py +++ b/tools/tryselect/selectors/release.py @@ -8,16 +8,21 @@ import os import attr from mozilla_version.gecko import FirefoxVersion from ..cli import BaseTryParser from ..push import push_to_try, vcs +def read_file(path): + with open(path) as fh: + return fh.read() + + class ReleaseParser(BaseTryParser): name = 'release' arguments = [ [['-v', '--version'], {'metavar': 'STR', 'required': True, 'action': 'store', 'type': FirefoxVersion.parse, @@ -25,21 +30,28 @@ class ReleaseParser(BaseTryParser): }], [['--migration'], {'metavar': 'STR', 'action': 'append', 'dest': 'migrations', 'choices': ['central-to-beta', 'beta-to-release'], 'help': "Migration to run for the release (can be specified multiple times).", }], + [['--no-limit-locales'], + {'action': 'store_false', + 'dest': 'limit_locales', + 'help': "Don't build a limited number of locales in the staging release.", + }], ] common_groups = ['push'] -def run_try_release(version, migrations=(), push=True, message='{msg}', **kwargs): +def run_try_release( + version, migrations=(), push=True, message='{msg}', limit_locales=True, **kwargs +): if version.is_beta: app_version = attr.evolve(version, beta_number=None) else: app_version = version files_to_change = { 'browser/config/version.txt': '{}\n'.format(app_version), @@ -68,19 +80,24 @@ def run_try_release(version, migrations= '{}.py'.format(migration.replace('-', '_')), ) migration_config = {} execfile(migration_path, migration_config, migration_config) for (path, from_, to) in migration_config['config']['replacements']: if path in files_to_change: contents = files_to_change[path] else: - with open(path) as fh: - contents = fh.read() + contents = read_file(path) files_to_change[path] = contents.replace(from_, to) + if limit_locales: + files_to_change['browser/locales/l10n-changesets.json'] = read_file( + os.path.join(vcs.path, 'browser/locales/l10n-onchange-changesets.json')) + files_to_change['browser/locales/shipped-locales'] = "en-US\n" + read_file( + os.path.join(vcs.path, 'browser/locales/onchange-locales')) + msg = 'staging release: {}'.format(version) return push_to_try( 'release', message.format(msg=msg), push=push, closed_tree=kwargs["closed_tree"], try_task_config=task_config, files_to_change=files_to_change, )