boklm pushed to branch maint-13.0 at The Tor Project / Applications / tor-browser-build
Commits: ebea2eb3 by Nicolas Vigier at 2024-04-15T17:17:44+02:00 Bug 41122: Add var/browser_release_date
Add a release date, and use it for MOZ_BUILD_DATE, and as timestamp on files in projects/browser.
For nightly we use a release date based on the version number.
- - - - -
2 changed files:
- projects/browser/config - rbm.conf
Changes:
===================================== projects/browser/config ===================================== @@ -1,6 +1,7 @@ # vim: filetype=yaml sw=2 version: '[% c("var/torbrowser_version") %]' filename: '[% c("var/project-name") %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %]' +timestamp: '[% c("var/browser_release_date_timestamp") %]' container: use_container: 1
===================================== rbm.conf ===================================== @@ -80,6 +80,8 @@ var: - '13.0.12' - '[% IF c("var/tor-browser") %]13.0.11[% END %]' - '[% IF c("var/mullvad-browser") %]13.0.10[% END %]' + browser_release_date: '2024/03/28 01:02:03' + browser_release_date_timestamp: '[% USE date; date.format(c("var/browser_release_date"), "%s") %]' updater_enabled: 1 build_mar: 1 mar_channel_id: '[% c("var/projectname") %]-torproject-[% c("var/channel") %]' @@ -204,7 +206,8 @@ var: [% END -%]
DOCSDIR_project: '[% project %]' - set_MOZ_BUILD_DATE: 'export MOZ_BUILD_DATE=[% c("var_p/MOZ_BUILD_DATE") %]' + set_MOZ_BUILD_DATE: 'export MOZ_BUILD_DATE=[% c("var/MOZ_BUILD_DATE") %]' + MOZ_BUILD_DATE: '[% USE date; date.format(c("var/browser_release_date"), "%Y%m%d%H%M%S") %]'
# var/essential_deps is the same as var/deps, except that we never # redefine it in projects config. This is for the packages we want to @@ -246,6 +249,14 @@ targets: GET c("var_p/nightly_torbrowser_version"); END; -%] + browser_release_date: | + [% + IF (matches = c("var/torbrowser_version").match('^tbb-nightly.(\d\d\d\d).(\d\d).(\d\d)$')); + GET matches.0 _ "/" _ matches.1 _ "/" _ matches.2 _ " 01:01:01"; + ELSE; + GET "2000/01/01 01:01:01"; + END + -%] max_torbrowser_incremental_from: 2 build_infos_json: 1
@@ -725,31 +736,5 @@ gpg_allow_expired_keys: 1 } return [@res]; }, - MOZ_BUILD_DATE => sub { - use POSIX qw(strftime); - my ($project, $options) = @_; - my $nightly = project_config($project, 'var/nightly', $options); - my $testbuild = project_config($project, 'var/testbuild', $options); - - if ($nightly && !$testbuild) { - my $torbrowser_version = project_config($project, 'var/torbrowser_version', $options); - return sprintf("%d%02d%02d000001", $1, $2, $3) - if $torbrowser_version =~ m/^tbb-nightly.([^.]+).([^.]+).([^.]+)$/; - return strftime("%Y%m%d000001", gmtime); - } - - my $timestamp = project_config($project, 'timestamp', $options); - if (!$nightly) { - my $torbrowser_version = project_config($project, 'var/torbrowser_version', $options); - my @n = reverse split /[.\D]/, $torbrowser_version; - my $i = 1; - unshift @n, 0 if @n < 3; - for my $n (@n) { - $timestamp += $n * $i; - $i = $i * 10; - } - } - return strftime "%Y%m%d%H%M%S", gmtime($timestamp); - }, }, )
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/eb...
tbb-commits@lists.torproject.org