Bug 1459181 - Fetch version-specific "whatsnew" on mozilla-release only r=sfraser

MozReview-Commit-ID: Iaet3uja3vG

--HG--
extra : rebase_source : a2a7a5b449361c9ec1e89d34feda11a9f64f5d3b
This commit is contained in:
Johan Lorenzo 2018-05-04 15:56:19 +02:00
parent 5a6e7b299b
commit d7e248fb83
2 changed files with 24 additions and 0 deletions

View File

@ -37,6 +37,15 @@ jobs:
mozilla-beta: org.mozilla.firefox_beta
mozilla-release: org.mozilla.firefox
default: org.mozilla.fennec_aurora # Fetches strings for mozilla-central
MAJOR_VERSION_NUMBER:
by-project:
# Specifying major version allows get_l10n_strings.py to download the correct
# "whatsnew" section in Fennec RCs. We don't specify it in mozilla-beta because
# strings may not be ready at the time of the first Fennec beta.
mozilla-release: "{major_version}"
# Will be unset by transform if empty
default: ''
# XXX The folder depends on the one defined in the Dockerfile
GOOGLE_PLAY_STRING_FILE: /builds/worker/google_play_strings.json
command:
@ -46,6 +55,7 @@ jobs:
python3 ./mozapkpublisher/get_l10n_strings.py
--package-name "${PACKAGE_NAME}"
--output-file "${GOOGLE_PLAY_STRING_FILE}"
${MAJOR_VERSION_NUMBER+--major-version-number ${MAJOR_VERSION_NUMBER}}
treeherder:
symbol: pub(gps)
platform: Android/opt

View File

@ -10,6 +10,7 @@ from __future__ import absolute_import, print_function, unicode_literals
from taskgraph.transforms.base import TransformSequence
from taskgraph.transforms.task import task_description_schema
from taskgraph.util.schema import resolve_keyed_by, Schema, validate_schema
from taskgraph.util.scriptworker import get_release_config
from voluptuous import Required
@ -57,4 +58,17 @@ def set_worker_data(config, jobs):
project=config.params['project']
)
resolve_keyed_by(
env, 'MAJOR_VERSION_NUMBER', item_name=job['name'],
project=config.params['project']
)
if env.get('MAJOR_VERSION_NUMBER'):
release_config = get_release_config(config)
major_version = release_config['version'].split('.')[0]
env['MAJOR_VERSION_NUMBER'] = env['MAJOR_VERSION_NUMBER'].format(
major_version=major_version
)
else:
del env['MAJOR_VERSION_NUMBER']
yield job