# vim: filetype=yaml sw=2
filename: '[% project %]-[% c("step") %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
git_url: https://gitlab.torproject.org/tpo/translation.git
version: '[% c("abbrev") %]'

steps:
  base-browser:
    base-browser: '[% INCLUDE build %]'
    git_hash: 97c76d5183b16b069e66feaaf10e00c1d2c7d9e0
    targets:
      nightly:
        git_hash: 'base-browser'
  base-browser-fluent:
    base-browser-fluent: '[% INCLUDE build %]'
    git_hash: d473c4dd005325d1be40bae0f816974e195a972d
    targets:
      nightly:
        git_hash: 'basebrowser-newidentityftl'
  tor-browser:
    tor-browser: '[% INCLUDE build %]'
    git_hash: 267f3c208a323df636ed11e7143164956d3d9d9b
    targets:
      nightly:
        git_hash: 'tor-browser'
  fenix:
    fenix: '[% INCLUDE build %]'
    # We need to bump the commit before releasing but just pointing to a branch
    # might cause too much rebuidling of the Firefox part.
    git_hash: 0deec2a78dea0013e8c4eaec1d40ef5aac4e43b0
    targets:
      nightly:
        git_hash: 'fenix-torbrowserstringsxml'
  list_updates:
    list_updates: |
      [%
        FOREACH component = [ 'base-browser', 'base-browser-fluent', 'tor-browser', 'fenix' ];
          branch = pc(project, 'git_hash', { step => component, target => [ 'nightly' ] });
          commit_hash = exec('git rev-parse ' _ branch, { git_hash => branch });
          IF commit_hash == pc(project, "git_hash", { step => component });
            GET '* ' _ component _ " is up to date\n";
          ELSE;
            GET '* ' _ component _ ' can be updated: ' _ commit_hash _ "\n";
          END;
        END;
        -%]
    fetch: 1
