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

kind-dependencies:
    - release-beetmover-push-to-release
    - post-beetmover-components-dummy
    - push-bundle

task-defaults:
    description: Release Promotion version bump/tag
    run-on-projects: []
    shipping-phase: ship
    worker-type: lando
    worker:
        implementation: landoscript
        tags: ['release']
        lando-repo:
            by-project:
                mozilla-beta: firefox-beta
                mozilla-release: firefox-release
                mozilla-esr115: firefox-esr115
                mozilla-esr128: firefox-esr128
                try:
                    by-release-type:
                        beta: staging-firefox-beta
                        release: staging-firefox-release
                        release-rc: staging-firefox-release
                        esr115: staging-firefox-esr115
                        esr128: staging-firefox-esr128
                        default: ""
                default: ""
        # used to map hg revisions to the git revisions that landoscript needs
        hg-repo-url:
            by-project:
                mozilla-beta: https://hg.mozilla.org/releases/mozilla-beta
                mozilla-release: https://hg.mozilla.org/releases/mozilla-release
                mozilla-esr115: https://hg.mozilla.org/releases/mozilla-esr115
                mozilla-esr128: https://hg.mozilla.org/releases/mozilla-esr128
                try: https://hg.mozilla.org/try
                default: ""
        # We're bumping both desktop and mobile version regardless of which product is getting
        # released, to avoid confusion from them getting out of sync.
        bump-files:
            by-release-type:
                default:
                    - "browser/config/version_display.txt"
                    - "mobile/android/version.txt"
                release:
                    - "browser/config/version.txt"
                    - "browser/config/version_display.txt"
                    - "config/milestone.txt"
                    - "mobile/android/version.txt"
                esr.*:
                    - "browser/config/version.txt"
                    - "browser/config/version_display.txt"
                    - "config/milestone.txt"

tasks:
    firefox:
        name: firefox-version-bump
        shipping-product: firefox
        treeherder:
            platform: firefox-release/opt
            symbol: Rel(VerBump)
            tier: 1
            kind: build

    devedition:
        name: devedition-version-bump
        shipping-product: devedition
        treeherder:
            platform: devedition-release/opt
            symbol: Rel(VerBump)
            tier: 1
            kind: build

    firefox-android:
        name: firefox-android-version-bump
        shipping-product: firefox-android
        treeherder:
            platform: fenix-android-all/opt
            symbol: Rel(VerBump)
            tier: 1
            kind: build
