# 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.release_version_bump: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: tree
    worker:
        implementation: treescript
        dontbuild: true
        tags: ['release']
        bump: true
        # 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"
        push:
            by-project:
                mozilla-(beta|release|esr.*): true
                maple: true
                default: false

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
