# 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:
    - gecko_taskgraph.transforms.resolve_landoscript_keyed_by:transforms
    - gecko_taskgraph.transforms.task:transforms

task-defaults:
    run-on-repo-type: [hg]
    worker-type: lando
    worker:
        implementation: scriptworker-lando
        dontbuild:
            by-project:
                mozilla-beta: false
                default: true
        ignore-closed-tree:
            by-project:
                mozilla-beta: false
                default: true
        lando-repo:
            by-project:
                mozilla-central: main
                mozilla-beta: firefox-beta
                mozilla-release: firefox-release
                mozilla-esr140: firefox-esr140
                autoland: firefox-autoland
                # change this if you want to test esr bumps against other
                # branches on try; there's rarely a need though.
                try: staging-firefox-autoland
                # set a default to avoid failing tgdiff tests on other branches
                # even though this doesn't run there
                default: ''
        actions:
            by-release-type:
                # XXX whenever the `beta` config changes, make sure to make
                #     the corresponding change in merge-automation/kind.yml
                beta:
                    - l10n-bump:
                          - name: Firefox l10n changesets
                            path: browser/locales/l10n-changesets.json
                            l10n-repo-url: https://github.com/mozilla-l10n/firefox-l10n
                            l10n-repo-target-branch: main
                            ignore-config:
                                ja:
                                    - macosx64
                                    - macosx64-devedition
                                ja-JP-mac:
                                    - linux64
                                    - linux64-devedition
                                    - linux64-aarch64-devedition
                                    - linux64-aarch64
                                    - win32
                                    - win32-devedition
                                    - win64
                                    - win64-devedition
                                    - win64-aarch64
                                    - win64-aarch64-devedition
                            platform-configs:
                                [
                                    {
                                        "platforms":
                                            [
                                                "linux64",
                                                "linux64-aarch64",
                                                "linux64-devedition",
                                                "linux64-aarch64-devedition",
                                                "macosx64",
                                                "macosx64-devedition",
                                                "win32",
                                                "win32-devedition",
                                                "win64",
                                                "win64-devedition",
                                                "win64-aarch64",
                                                "win64-aarch64-devedition",
                                            ],
                                        "path": "browser/locales/shipped-locales",
                                    },
                                ]
                          - name: Mobile l10n changesets
                            path: mobile/locales/l10n-changesets.json
                            l10n-repo-url: https://github.com/mozilla-l10n/firefox-l10n
                            l10n-repo-target-branch: main
                            platform-configs:
                                [
                                    {
                                        "platforms":
                                            [
                                                "android",
                                                "android-arm",
                                                "android-multilocale",
                                            ],
                                        "path": "mobile/android/locales/all-locales",
                                    },
                                ]
                default:
                    - l10n-bump:
                          - name: Firefox l10n changesets
                            path: browser/locales/l10n-changesets.json
                            l10n-repo-url: https://github.com/mozilla-l10n/firefox-l10n
                            l10n-repo-target-branch: main
                            ignore-config:
                                ja:
                                    - macosx64
                                    - macosx64-devedition
                                ja-JP-mac:
                                    - linux64
                                    - linux64-aarch64
                                    - linux64-devedition
                                    - linux64-aarch64-devedition
                                    - win32
                                    - win32-devedition
                                    - win64
                                    - win64-devedition
                                    - win64-aarch64
                                    - win64-aarch64-devedition
                            platform-configs:
                                [
                                    {
                                        "platforms":
                                            [
                                                "linux64",
                                                "linux64-aarch64",
                                                "linux64-devedition",
                                                "linux64-aarch64-devedition",
                                                "macosx64",
                                                "macosx64-devedition",
                                                "win32",
                                                "win32-devedition",
                                                "win64",
                                                "win64-devedition",
                                                "win64-aarch64",
                                                "win64-aarch64-devedition",
                                            ],
                                        "path": "browser/locales/all-locales",
                                    },
                                ]
                          - name: Mobile l10n changesets
                            path: mobile/locales/l10n-changesets.json
                            l10n-repo-url: https://github.com/mozilla-l10n/firefox-l10n
                            l10n-repo-target-branch: main
                            platform-configs:
                                [
                                    {
                                        "platforms":
                                            [
                                                "android",
                                                "android-arm",
                                                "android-multilocale",
                                            ],
                                        "path": "mobile/android/locales/all-locales",
                                    },
                                ]

tasks:
    l10n-bumper:
        name: l10n_bumper
        description: l10n changesets bumper
        run-on-projects: []
        treeherder:
            kind: build
            platform: linux64/opt
            symbol: l10n-bump(lb)
            tier: 1
