mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-12 22:28:59 +02:00
MozReview-Commit-ID: 6aPdGbxn0D1 --HG-- rename : taskcluster/taskgraph/task/__init__.py => taskcluster/taskgraph/loader/__init__.py rename : taskcluster/taskgraph/task/balrog.py => taskcluster/taskgraph/loader/balrog.py rename : taskcluster/taskgraph/task/beetmover.py => taskcluster/taskgraph/loader/beetmover.py rename : taskcluster/taskgraph/task/beetmover_checksums.py => taskcluster/taskgraph/loader/beetmover_checksums.py rename : taskcluster/taskgraph/task/checksums_signing.py => taskcluster/taskgraph/loader/checksums_signing.py rename : taskcluster/taskgraph/task/post_build.py => taskcluster/taskgraph/loader/post_build.py rename : taskcluster/taskgraph/task/repacks.py => taskcluster/taskgraph/loader/repacks.py rename : taskcluster/taskgraph/task/signing.py => taskcluster/taskgraph/loader/signing.py rename : taskcluster/taskgraph/task/test.py => taskcluster/taskgraph/loader/test.py rename : taskcluster/taskgraph/task/transform.py => taskcluster/taskgraph/loader/transform.py rename : taskcluster/taskgraph/task/base.py => taskcluster/taskgraph/task.py extra : rebase_source : 42a183bae9aedfa04876d99a59119fd08bbf7d73
32 lines
1.1 KiB
Python
32 lines
1.1 KiB
Python
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
from __future__ import absolute_import, print_function, unicode_literals
|
|
|
|
|
|
def loader(kind, path, config, params, loaded_tasks):
|
|
"""
|
|
Generate tasks implementing l10n repack jobs. These may depend on build
|
|
jobs and do a repack of them
|
|
"""
|
|
only_platforms = config.get('only-for-build-platforms')
|
|
|
|
for task in loaded_tasks:
|
|
if task.kind not in config.get('kind-dependencies'):
|
|
continue
|
|
|
|
build_platform = task.attributes.get('build_platform')
|
|
build_type = task.attributes.get('build_type')
|
|
if not build_platform or not build_type:
|
|
continue
|
|
platform = "{}/{}".format(build_platform, build_type)
|
|
if only_platforms and platform not in only_platforms:
|
|
continue
|
|
|
|
repack_task = {'dependent-task': task}
|
|
|
|
if config.get('job-template'):
|
|
repack_task.update(config.get('job-template'))
|
|
|
|
yield repack_task
|