diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /python/mach | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'python/mach')
-rw-r--r-- | python/mach/mach/command_util.py | 2 | ||||
-rw-r--r-- | python/mach/mach/util.py | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/python/mach/mach/command_util.py b/python/mach/mach/command_util.py index 741539f6f6..e8238bd83e 100644 --- a/python/mach/mach/command_util.py +++ b/python/mach/mach/command_util.py @@ -134,6 +134,7 @@ MACH_COMMANDS = { "mach-debug-commands": MachCommandReference( "python/mach/mach/commands/commandinfo.py" ), + "macos-sign": MachCommandReference("tools/signing/macos/mach_commands.py"), "manifest": MachCommandReference("testing/mach_commands.py"), "marionette-test": MachCommandReference("testing/marionette/mach_commands.py"), "mochitest": MachCommandReference("testing/mochitest/mach_commands.py", ["test"]), @@ -203,6 +204,7 @@ MACH_COMMANDS = { ), "tps-build": MachCommandReference("testing/tps/mach_commands.py"), "try": MachCommandReference("tools/tryselect/mach_commands.py"), + "ts": MachCommandReference("tools/ts/mach_commands.py"), "uniffi": MachCommandReference( "toolkit/components/uniffi-bindgen-gecko-js/mach_commands.py" ), diff --git a/python/mach/mach/util.py b/python/mach/mach/util.py index 203f08f92b..b6bf1727fa 100644 --- a/python/mach/mach/util.py +++ b/python/mach/mach/util.py @@ -115,3 +115,18 @@ def to_optional_str(path: Optional[Path]): return str(path) else: return None + + +def strtobool(value: str): + # Reimplementation of distutils.util.strtobool + # https://docs.python.org/3.9/distutils/apiref.html#distutils.util.strtobool + true_vals = ("y", "yes", "t", "true", "on", "1") + false_vals = ("n", "no", "f", "false", "off", "0") + + value = value.lower() + if value in true_vals: + return 1 + if value in false_vals: + return 0 + + raise ValueError(f'Expected one of: {", ".join(true_vals + false_vals)}') |