# 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: 50ec65bc65e510156c1e9f5c835eb6ea034450d0
    targets:
      nightly:
        git_hash: 'base-browser'
  base-browser-fluent:
    base-browser-fluent: '[% INCLUDE build %]'
    git_hash: 667a6daeba46b7aeb0a8b664bd9ae006f8ac233d
    targets:
      nightly:
        git_hash: 'basebrowser-newidentityftl'
  tor-browser:
    tor-browser: '[% INCLUDE build %]'
    git_hash: e9ad920fc7427ff1b84e3723a97212ccd78dfe26
    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: f9fd1869f6904e3a9fe99fa3626382b20ff33e66
    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
