# 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/.
---
loader: taskgraph.loader.transform:loader

transforms:
    - taskgraph.transforms.from_deps
    - gecko_taskgraph.transforms.repackage_set_upstream_mac_kind
    - gecko_taskgraph.transforms.chunk_partners
    - gecko_taskgraph.transforms.name_sanity
    - gecko_taskgraph.transforms.repackage_partner
    - gecko_taskgraph.transforms.job
    - gecko_taskgraph.transforms.task

kind-dependencies:
    - release-partner-repack
    - release-partner-repack-mac-signing
    - release-partner-repack-mac-notarization
    - toolchain

only-for-build-platforms:
    - macosx64-shippable/opt
    - win32-shippable/opt
    - win64-shippable/opt
    - win64-aarch64-shippable/opt

tasks:
    release-partner-repack-repackage:
        from-deps:
            group-by: single-with-filters
        upstream-mac-kind:
            by-build-type:
                debug: release-partner-repack-mac-signing
                default:
                    by-project:
                        mozilla-(central|beta|release|esr.*): release-partner-repack-mac-notarization
                        default: release-partner-repack-mac-signing
        mozharness:
            config:
                by-build-platform:
                    macosx64-.*:
                        - repackage/base.py
                        - repackage/osx_partner.py
                    win32-.*:
                        - repackage/base.py
                        - repackage/win32_sfx_stub.py
                        - repackage/win32_partner.py
                    win64-(?!aarch64).*:
                        - repackage/base.py
                        - repackage/win32_sfx_stub.py
                        - repackage/win64_partner.py
                    win64-aarch64-.*:
                        - repackage/base.py
                        - repackage/win64-aarch64_sfx_stub.py
                        - repackage/win64_partner.py
        package-formats:
            by-build-platform:
                macosx64\b.*: [dmg]
                win32\b.*: [installer]
                win64\b.*: [installer]
