---
tmp_dir: '[% c("tmp_dir") %]'
create_downloads_json: 1
[% IF !c("var/browser_platforms/signing_desktop") -%]
create_downloads_json_only: 1
[% END -%]
appname_marfile: '[% c("var/project-name") %]'
appname_bundle: '[% c("var/project-name") %]'
releases_dir: [% path(c('output_dir')) %][% IF ! c("var/nightly") %]/[% IF c("var/unsigned_releases_dir") -%]un[% END %]signed[% END %]
download:
    gpg_keyring: ../../keyring/torbrowser.gpg
    archive_url: 'https://archive.torproject.org/tor-package-archive/[% c("var/projectname") %]'
[% IF c("var/tor-browser") -%]
    bundles_url: 'https://dist.torproject.org/torbrowser'
    mars_url: 'https://cdn.torproject.org/aus1/torbrowser'
[% END -%]
[% IF c("var/mullvad-browser") -%]
    bundles_url: 'https://cdn.mullvad.net/browser'
    mars_url: 'https://cdn.mullvad.net/browser'
[% END -%]
build_targets:
    linux-aarch64: Linux_aarch64-gcc3
    linux-x86_64: Linux_x86_64-gcc3
    windows-i686:
        - WINNT_x86-gcc3
        - WINNT_x86-gcc3-x86
        - WINNT_x86-gcc3-x64
    windows-x86_64: WINNT_x86_64-gcc3-x64
    macos:
      - Darwin_x86_64-gcc3
      - Darwin_aarch64-gcc3
channels:
    [% c('var/channel') %]:
      - [% c("var/torbrowser_version") %]
[% IF c("var/tor-browser") && c("var/torbrowser_legacy_version") -%]
      - [% c("var/torbrowser_legacy_version") %]
[% END -%]
versions:
    [% c("var/torbrowser_version") %]:
[% IF c("var/create_unsigned_incrementals") -%]
        releases_dir: [% path(c('output_dir')) %]/unsigned
[% END -%]
        mar_channel_id: [% c('var/mar_channel_id') %]
        platformVersion: [% pc('firefox', 'var/firefox_platform_version') %]
[% IF c("var/tor-browser") -%]
        detailsURL: https://blog.torproject.org/new[% IF c("var/alpha") %]-alpha[% END %]-release-tor-browser-[% c("var/torbrowser_version") FILTER remove('\.') %]
[% END -%]
[% IF c("var/mullvad-browser") -%]
        detailsURL: https://github.com/mullvad/mullvad-browser/releases/[% c("var/torbrowser_version") %]
[% END -%]
        incremental_from:
[% SET incr_from = c("var/nightly") ? c("var_p/nightly_torbrowser_incremental_from") : c("var/torbrowser_incremental_from");
   FOREACH v IN incr_from;
     SET ver = tmpl(v);
     IF ver -%]
          - [% ver %]
[%   END;
   END -%]
        # minSupportedOsVersion on macOS corresponds to the Darwin version ( https://en.wikipedia.org/wiki/Darwin_(operating_system) )
        macos:
            # macOS v10.15.0
            minSupportedOSVersion: 19.0.0
        # minSupportedOsVersion on Windows corresponds to the operating system version ( https://docs.microsoft.com/en-us/windows/win32/sysinfo/operating-system-version )
        windows-i686:
            # Windows 10
            minSupportedOSVersion: 10.0
        windows-x86_64:
            # Windows 10
            minSupportedOSVersion: 10.0
        linux-x86_64:
            minSupportedInstructionSet: SSE2
[% IF c("var/tor-browser") && c("var/torbrowser_legacy_version") -%]
    [% c("var/torbrowser_legacy_version") %]:
        mar_channel_id: [% c('var/mar_channel_id') %]
        platformVersion: [% c('var/torbrowser_legacy_platform_version') %]
        detailsURL: https://blog.torproject.org/new[% IF c("var/alpha") %]-alpha[% END %]-release-tor-browser-[% c("var/torbrowser_legacy_version") FILTER remove('\.') %]
        # minSupportedOsVersion on macOS corresponds to the Darwin version ( https://en.wikipedia.org/wiki/Darwin_(operating_system) )
        macos:
            # macOS v10.12.0
            minSupportedOSVersion: 16.0.0
        # minSupportedOsVersion on Windows corresponds to the operating system version ( https://docs.microsoft.com/en-us/windows/win32/sysinfo/operating-system-version )
        windows-i686:
            # Windows 7
            minSupportedOSVersion: 6.1
            minSupportedInstructionSet: SSE2
        windows-x86_64:
            # Windows 7
            minSupportedOSVersion: 6.1
            minSupportedInstructionSet: SSE2
[% END -%]
mar_compression: xz
[% IF c("var/tor-browser") -%]
tag: 'tbb-[% c("var/torbrowser_version") %]-[% c("var/torbrowser_build") %]'
[% END -%]
[% IF c("var/mullvad-browser") -%]
tag: 'mb-[% c("var/torbrowser_version") %]-[% c("var/torbrowser_build") %]'
[% END -%]

[% IF c("var/tor-browser") -%]
htaccess_rewrite_rules:
    alpha: |
        # bug 26569: Redirect pre-8.0a9 alpha users to a separate update directory
        RewriteRule ^[^/]+/8\.0a[12345678]/.* https://aus1.torproject.org/torbrowser/update_pre8.0a9/alpha/$0 [last]
        RewriteRule ^[^/]+/[4567]\..*/.* https://aus1.torproject.org/torbrowser/update_pre8.0a9/alpha/$0 [last]
        # tor-browser#42747: Make 13.5a10 a watershed alpha release
        RewriteRule ^[^/]+/\d\..*/.* https://aus1.torproject.org/torbrowser/update_pre13.5a10/alpha/$0 [last]
        RewriteRule ^[^/]+/1[012]\..*/.* https://aus1.torproject.org/torbrowser/update_pre13.5a10/alpha/$0 [last]
        RewriteRule ^[^/]+/13\.0.*/.* https://aus1.torproject.org/torbrowser/update_pre13.5a10/alpha/$0 [last]
        RewriteRule ^[^/]+/13\.5a\d/.* https://aus1.torproject.org/torbrowser/update_pre13.5a10/alpha/$0 [last]
        # tor-browser-build41356: Make 14.0a4 a watershed alpha release
        RewriteRule ^[^/]+/14\.0a[123]/.* https://aus1.torproject.org/torbrowser/update_pre14.0a4/alpha/$0 [last]
    release: |
        # bug 26570: Redirect pre-8.0 stable users to a separate update directory
        RewriteRule ^[^/]+/[4567]\..*/.* https://aus1.torproject.org/torbrowser/update_pre8.0/release/$0 [last]
        # tor-browser-build#40678: Force all <=11.5.7 users to update through 11.5.8 before 12.0
        RewriteRule ^[^/]+/[89]\..*/.* https://aus1.torproject.org/torbrowser/update_pre12.0/release/$0 [last]
        RewriteRule ^[^/]+/10\..*/.* https://aus1.torproject.org/torbrowser/update_pre12.0/release/$0 [last]
        RewriteRule ^[^/]+/11\.0.*/.* https://aus1.torproject.org/torbrowser/update_pre12.0/release/$0 [last]
        RewriteRule ^[^/]+/11\.5/.* https://aus1.torproject.org/torbrowser/update_pre12.0/release/$0 [last]
        RewriteRule ^[^/]+/11\.5\.[01234567]/.* https://aus1.torproject.org/torbrowser/update_pre12.0/release/$0 [last]
        # tor-browser-build#41270: make 13.5.7 a watershed update
        RewriteRule ^[^/]+/1[12]\.[05].*/.* https://aus1.torproject.org/torbrowser/update_pre14.0/release/$0 [last]
        RewriteRule ^[^/]+/13\.0.*/.* https://aus1.torproject.org/torbrowser/update_pre14.0/release/$0 [last]
        RewriteRule ^[^/]+/13\.5/.* https://aus1.torproject.org/torbrowser/update_pre14.0/release/$0 [last]
        RewriteRule ^[^/]+/13\.5\.[0123456]/.* https://aus1.torproject.org/torbrowser/update_pre14.0/release/$0 [last]
[% END -%]
