boklm pushed to branch maint-13.0 at The Tor Project / Applications / tor-browser-build

Commits:

2 changed files:

Changes:

  • projects/browser/config
    1 1
     # vim: filetype=yaml sw=2
    
    2 2
     version: '[% c("var/torbrowser_version") %]'
    
    3 3
     filename: '[% c("var/project-name") %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %]'
    
    4
    +timestamp: '[% c("var/browser_release_date_timestamp") %]'
    
    4 5
     container:
    
    5 6
       use_container: 1
    
    6 7
     
    

  • rbm.conf
    ... ... @@ -80,6 +80,8 @@ var:
    80 80
         - '13.0.12'
    
    81 81
         - '[% IF c("var/tor-browser") %]13.0.11[% END %]'
    
    82 82
         - '[% IF c("var/mullvad-browser") %]13.0.10[% END %]'
    
    83
    +  browser_release_date: '2024/03/28 01:02:03'
    
    84
    +  browser_release_date_timestamp: '[% USE date; date.format(c("var/browser_release_date"), "%s") %]'
    
    83 85
       updater_enabled: 1
    
    84 86
       build_mar: 1
    
    85 87
       mar_channel_id: '[% c("var/projectname") %]-torproject-[% c("var/channel") %]'
    
    ... ... @@ -204,7 +206,8 @@ var:
    204 206
         [% END -%]
    
    205 207
     
    
    206 208
       DOCSDIR_project: '[% project %]'
    
    207
    -  set_MOZ_BUILD_DATE: 'export MOZ_BUILD_DATE=[% c("var_p/MOZ_BUILD_DATE") %]'
    
    209
    +  set_MOZ_BUILD_DATE: 'export MOZ_BUILD_DATE=[% c("var/MOZ_BUILD_DATE") %]'
    
    210
    +  MOZ_BUILD_DATE: '[% USE date; date.format(c("var/browser_release_date"), "%Y%m%d%H%M%S") %]'
    
    208 211
     
    
    209 212
       # var/essential_deps is the same as var/deps, except that we never
    
    210 213
       # redefine it in projects config. This is for the packages we want to
    
    ... ... @@ -246,6 +249,14 @@ targets:
    246 249
                     GET c("var_p/nightly_torbrowser_version");
    
    247 250
                END;
    
    248 251
             -%]
    
    252
    +      browser_release_date: |
    
    253
    +        [%
    
    254
    +          IF (matches = c("var/torbrowser_version").match('^tbb-nightly\.(\d\d\d\d)\.(\d\d)\.(\d\d)$'));
    
    255
    +            GET matches.0 _ "/" _ matches.1 _ "/" _ matches.2 _ " 01:01:01";
    
    256
    +          ELSE;
    
    257
    +            GET "2000/01/01 01:01:01";
    
    258
    +          END
    
    259
    +          -%]
    
    249 260
           max_torbrowser_incremental_from: 2
    
    250 261
           build_infos_json: 1
    
    251 262
     
    
    ... ... @@ -725,31 +736,5 @@ gpg_allow_expired_keys: 1
    725 736
             }
    
    726 737
             return [@res];
    
    727 738
           },
    
    728
    -      MOZ_BUILD_DATE => sub {
    
    729
    -        use POSIX qw(strftime);
    
    730
    -        my ($project, $options) = @_;
    
    731
    -        my $nightly = project_config($project, 'var/nightly', $options);
    
    732
    -        my $testbuild = project_config($project, 'var/testbuild', $options);
    
    733
    -
    
    734
    -        if ($nightly && !$testbuild) {
    
    735
    -          my $torbrowser_version = project_config($project, 'var/torbrowser_version', $options);
    
    736
    -          return sprintf("%d%02d%02d000001", $1, $2, $3)
    
    737
    -            if $torbrowser_version =~ m/^tbb-nightly\.([^\.]+)\.([^\.]+)\.([^\.]+)$/;
    
    738
    -          return strftime("%Y%m%d000001", gmtime);
    
    739
    -        }
    
    740
    -
    
    741
    -        my $timestamp = project_config($project, 'timestamp', $options);
    
    742
    -        if (!$nightly) {
    
    743
    -          my $torbrowser_version = project_config($project, 'var/torbrowser_version', $options);
    
    744
    -          my @n = reverse split /[\.\D]/, $torbrowser_version;
    
    745
    -          my $i = 1;
    
    746
    -          unshift @n, 0 if @n < 3;
    
    747
    -          for my $n (@n) {
    
    748
    -            $timestamp += $n * $i;
    
    749
    -            $i = $i * 10;
    
    750
    -          }
    
    751
    -        }
    
    752
    -        return strftime "%Y%m%d%H%M%S", gmtime($timestamp);
    
    753
    -      },
    
    754 739
         },
    
    755 740
       )