# 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: f1f1204c2421db64ae3d30be31a4d7819b9a3e42
    targets:
      nightly:
        git_hash: 'base-browser'
  base-browser-fluent:
    base-browser-fluent: '[% INCLUDE build %]'
    git_hash: 3167fc379caac406941ae4fce429c302fd1a6d5d
    targets:
      nightly:
        git_hash: 'basebrowser-newidentityftl'
  tor-browser:
    tor-browser: '[% INCLUDE build %]'
    git_hash: 7089eb9ac06e0f6de99c386a09821c8799849206
    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: 65def475aa000981ac3c1b6db203e8e707f72e16
    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
