#!/usr/bin/env 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/. """desktop_partner_repacks.py
This script manages Desktop partner repacks for beta/release builds. """ import os import sys
# load modules from parent dir
sys.path.insert(1, os.path.dirname(sys.path[0]))
from mozharness.base.log import FATAL from mozharness.base.python import VirtualenvMixin from mozharness.base.script import BaseScript from mozharness.mozilla.automation import AutomationMixin from mozharness.mozilla.secrets import SecretsMixin
def _pre_config_lock(self, rw_config): if os.getenv("REPACK_MANIFESTS_URL"):
self.info( "Overriding repack_manifests_url to %s"
% os.getenv("REPACK_MANIFESTS_URL")
)
self.config["repack_manifests_url"] = os.getenv("REPACK_MANIFESTS_URL") if os.getenv("UPSTREAM_TASKIDS"):
self.info("Overriding taskIds with %s" % os.getenv("UPSTREAM_TASKIDS"))
self.config["taskIds"] = os.getenv("UPSTREAM_TASKIDS").split()
if"version"notin self.config:
self.fatal("Version (-v) not supplied.") if"build_number"notin self.config:
self.fatal("Build number (-n) not supplied.") if"repo_file"notin self.config:
self.fatal("repo_file not supplied.") if"repack_manifests_url"notin self.config:
self.fatal( "repack_manifests_url not supplied in config or via REPACK_MANIFESTS_URL"
) if"taskIds"notin self.config:
self.fatal("Need upstream taskIds from command line or in UPSTREAM_TASKIDS")
def query_abs_dirs(self): if self.abs_dirs: return self.abs_dirs
abs_dirs = super(DesktopPartnerRepacks, self).query_abs_dirs() for directory in abs_dirs:
value = abs_dirs[directory]
abs_dirs[directory] = value
dirs = {}
dirs["abs_repo_dir"] = os.path.join(abs_dirs["abs_work_dir"], ".repo")
dirs["abs_partners_dir"] = os.path.join(abs_dirs["abs_work_dir"], "partners") for key in dirs.keys(): if key notin abs_dirs:
abs_dirs[key] = dirs[key]
self.abs_dirs = abs_dirs return self.abs_dirs
def repack(self): """creates the repacks"""
repack_cmd = [ "./mach", "python", "python/mozrelease/mozrelease/partner_repack.py", "-v",
self.config["version"], "-n",
str(self.config["build_number"]),
] if self.config.get("platform"):
repack_cmd.extend(["--platform", self.config["platform"]]) if self.config.get("partner"):
repack_cmd.extend(["--partner", self.config["partner"]]) if self.config.get("taskIds"): for taskId in self.config["taskIds"]:
repack_cmd.extend(["--taskid", taskId]) if self.config.get("limitLocales"): for locale in self.config["limitLocales"]:
repack_cmd.extend(["--limit-locale", locale])
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.