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

task-defaults:
    worker-type: tree
    worker:
        implementation: treescript
        tags: []
        bump: false
        dontbuild:
            by-project:
                mozilla-beta: false
                default: true
        ignore-closed-tree:
            by-project:
                autoland: true
                default: false
        push:
            by-project:
                mozilla-(central|beta): true
                autoland: true
                default: false
        source-repo:
            by-release-type:
                beta: https://hg.mozilla.org/releases/mozilla-beta
                nightly: https://hg.mozilla.org/mozilla-central
                default: https://hg.mozilla.org/integration/autoland
        l10n-bump-info:
            by-release-type:
                # XXX whenever the `beta` config changes, make sure to make
                #     the corresponding change in merge-automation/kind.yml
                beta:
                    - name: Firefox l10n changesets
                      path: browser/locales/l10n-changesets.json
                      version-path: browser/config/version.txt
                      l10n-repo-url: https://github.com/mozilla-l10n/firefox-l10n
                      l10n-repo-target-branch: main
                      ignore-config:
                          ja:
                              - macosx64
                              - macosx64-devedition
                          ja-JP-mac:
                              - linux
                              - linux-devedition
                              - linux64
                              - linux64-devedition
                              - linux64-aarch64
                              - win32
                              - win32-devedition
                              - win64
                              - win64-devedition
                              - win64-aarch64
                              - win64-aarch64-devedition
                      platform-configs:
                          [
                              {
                                  "platforms":
                                      [
                                          "linux",
                                          "linux-devedition",
                                          "linux64",
                                          "linux64-aarch64",
                                          "linux64-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
                      version-path: mobile/android/version.txt
                      platform-configs:
                          [
                              {
                                  "platforms":
                                      [
                                          "android",
                                          "android-arm",
                                          "android-multilocale",
                                      ],
                                  "path": "mobile/android/locales/all-locales",
                              },
                          ]
                default:
                    - 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
                      version-path: browser/config/version.txt
                      ignore-config:
                          ja:
                              - macosx64
                              - macosx64-devedition
                          ja-JP-mac:
                              - linux
                              - linux-devedition
                              - linux64
                              - linux64-aarch64
                              - linux64-devedition
                              - win32
                              - win32-devedition
                              - win64
                              - win64-devedition
                              - win64-aarch64
                              - win64-aarch64-devedition
                      platform-configs:
                          [
                              {
                                  "platforms":
                                      [
                                          "linux",
                                          "linux-devedition",
                                          "linux64",
                                          "linux64-aarch64",
                                          "linux64-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
                      version-path: mobile/android/version.txt
                      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
