# 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: d862d323bd78e100de5f51f2f8742d21de3a76d0
    targets:
      nightly:
        git_hash: 'base-browser'
  base-browser-fluent:
    base-browser-fluent: '[% INCLUDE build %]'
    git_hash: 71869a9fd722c36eb57d08d7ef5a1fa5270ddb54
    targets:
      nightly:
        git_hash: 'basebrowser-newidentityftl'
  tor-browser:
    tor-browser: '[% INCLUDE build %]'
    git_hash: b3d9033d2229e82d30771aa7a1b77667d9a80628
    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: d19129475bae8943d3ee4ca6b6ed114a9a6db94e
    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
