tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

beetmover_repackage_l10n.py (1309B)


      1 # This Source Code Form is subject to the terms of the Mozilla Public
      2 # License, v. 2.0. If a copy of the MPL was not distributed with this
      3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
      4 """
      5 Transform the signing task into an actual task description.
      6 """
      7 
      8 from taskgraph.transforms.base import TransformSequence
      9 from taskgraph.util.dependencies import get_primary_dependency
     10 from taskgraph.util.treeherder import join_symbol
     11 
     12 transforms = TransformSequence()
     13 
     14 
     15 @transforms.add
     16 def make_beetmover_description(config, jobs):
     17    for job in jobs:
     18        dep_job = get_primary_dependency(config, job)
     19        assert dep_job
     20 
     21        locale = dep_job.attributes.get("locale")
     22        if not locale:
     23            yield job
     24            continue
     25 
     26        group = "BMR"
     27 
     28        # add the locale code
     29        symbol = locale
     30 
     31        treeherder = {
     32            "symbol": join_symbol(group, symbol),
     33        }
     34 
     35        beet_description = {
     36            "label": job["label"],
     37            "attributes": job["attributes"],
     38            "dependencies": job["dependencies"],
     39            "treeherder": treeherder,
     40            "locale": locale,
     41            "shipping-phase": job["shipping-phase"],
     42            "run-on-repo-type": job.get("run-on-repo-type", ["git", "hg"]),
     43        }
     44        yield beet_description