tor-browser

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

balrog_toplevel.py (1547B)


      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 beetmover task into an actual task description.
      6 """
      7 
      8 from mozilla_version.gecko import GeckoVersion
      9 from mozrelease.balrog import generate_update_properties
     10 from taskgraph.transforms.base import TransformSequence
     11 from taskgraph.util.yaml import load_yaml
     12 
     13 from gecko_taskgraph.util.scriptworker import get_release_config
     14 
     15 transforms = TransformSequence()
     16 
     17 
     18 @transforms.add
     19 def generate_update_line(config, jobs):
     20    """Resolve fields that can be keyed by platform, etc."""
     21    release_config = get_release_config(config)
     22    for job in jobs:
     23        config_file = job.pop("whats-new-config")
     24        update_config = load_yaml(config_file)
     25 
     26        product = job["shipping-product"]
     27        if product == "devedition":
     28            product = "firefox"
     29        job["worker"]["update-line"] = {}
     30        for blob_type, suffix in [("wnp", ""), ("no-wnp", "-No-WNP")]:
     31            context = {
     32                "release-type": config.params["release_type"],
     33                "product": product,
     34                "version": GeckoVersion.parse(release_config["appVersion"]),
     35                "blob-type": blob_type,
     36                "build-id": config.params["moz_build_date"],
     37            }
     38            job["worker"]["update-line"][suffix] = generate_update_properties(
     39                context, update_config
     40            )
     41 
     42        yield job