diff --git a/CHANGELOG.md b/CHANGELOG.md index d710ba4..2c4aeb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 3.1.2 (2025-05-22) + +### Fix + +- add missing mac signed_artifacts + ## 3.1.1 (2025-05-22) ### Fix diff --git a/pyproject.toml b/pyproject.toml index 61d89e5..2d23368 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mozilla-taskgraph" -version = "3.1.1" +version = "3.1.2" description = "Mozilla specific transforms and utilities for Taskgraph" readme = "README.md" authors = [ diff --git a/src/mozilla_taskgraph/util/signed_artifacts.py b/src/mozilla_taskgraph/util/signed_artifacts.py index b72e9de..09b7b06 100644 --- a/src/mozilla_taskgraph/util/signed_artifacts.py +++ b/src/mozilla_taskgraph/util/signed_artifacts.py @@ -10,6 +10,8 @@ def get_signed_artifacts(input, formats, behavior=None): artifacts = set() if input.endswith(".dmg"): artifacts.add(input.replace(".dmg", ".tar.gz")) + if behavior and behavior != "mac_sign": + artifacts.add(input.replace(".dmg", ".pkg")) else: artifacts.add(input) diff --git a/test/util/test_signed_artifacts.py b/test/util/test_signed_artifacts.py new file mode 100644 index 0000000..ab1a9d1 --- /dev/null +++ b/test/util/test_signed_artifacts.py @@ -0,0 +1,22 @@ +import pytest + +from mozilla_taskgraph.util.signed_artifacts import get_signed_artifacts + + +@pytest.mark.parametrize( + "input_file, formats, behavior, expected", + [ + ("example.dmg", [], None, {"example.tar.gz": True, "example.pkg": False}), + ("example.dmg", [], "mac_sign", {"example.tar.gz": True, "example.pkg": False}), + ("example.dmg", [], "other", {"example.tar.gz": True, "example.pkg": True}), + ("example.zip", [], None, {"example.zip": True}), + ("example.zip", ["gcp_prod_autograph_gpg"], None, {"example.zip.asc": True}), + ], +) +def test_get_signed_artifacts(input_file, formats, behavior, expected): + result = get_signed_artifacts(input_file, formats, behavior=behavior) + for artifact, exists in expected.items(): + if exists: + assert artifact in result + else: + assert artifact not in result diff --git a/uv.lock b/uv.lock index 06db181..64a136b 100644 --- a/uv.lock +++ b/uv.lock @@ -567,7 +567,7 @@ wheels = [ [[package]] name = "mozilla-taskgraph" -version = "3.1.1" +version = "3.1.2" source = { editable = "." } dependencies = [ { name = "taskcluster-taskgraph" },