# 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: 12b7ac4074f64be4d62c4a7e134244988941ca88
    targets:
      nightly:
        git_hash: 'base-browser'
  base-browser-fluent:
    base-browser-fluent: '[% INCLUDE build %]'
    git_hash: 7a5fa6b283ac0a983250dfb3870fb1ed9d9ec1ad
    targets:
      nightly:
        git_hash: 'basebrowser-newidentityftl'
  tor-browser:
    tor-browser: '[% INCLUDE build %]'
    git_hash: 96ce5976d1c1752ee1d920df58e1755464b9d575
    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: 12c25e54e3a80c22c3c5fd6ccbc00effd37fc538
    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
