GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still and

Verified Commit 0f019cf3 authored by boklm's avatar boklm
Browse files

Bug 25099: Set nightly version to tbb-nightly.$year.$month.$day

Include the current day in the nightly version number, so that each
build gets a different version number.

We get this version number using a perl function, and a "state"
variable, so that the day when the build was started is used.
This avoids issues when a build is started on a day but finishs on a
different day.

In the nightly directory, the builds are now stored using the version
instead of just the date.

We also allow overriding this version number by using the
TORBROWSER_NIGHTLY_VERSION environment variable. This could be useful
for example if you need to generate incremental mars for the version
from the previous day.
parent 07ffaa91
......@@ -62,7 +62,7 @@ channel you want to build:
You can find the build result in the directory release/unsigned/$version
or alpha/unsigned/$version for release or alpha builds. The result of
nightly can be found in the nightly/$date directory.
nightly can be found in the nightly/$version directory.
If you want to build for a specific platform only, append the platform
name to the makefile target:
......@@ -6,9 +6,8 @@ use strict;
die "wrong number of arguments" unless @ARGV == 2;
my ($year, $version) = @ARGV;
my $date;
if ($version eq 'tbb-nightly') {
my (undef, undef, undef, $day, $mon, $y) = localtime;
$date = sprintf("%d%02d%02d010101", $y + 1900, $mon + 1, $day);
if ($version =~ m/^tbb-nightly\.([^\.]+)\.([^\.]+)\.([^\.]+)$/) {
$date = sprintf("%d%02d%02d010101", $1, $2, $3);
} else {
my @v = split(/[\.ab]/, $version);
push @v, '0' if @v < 4;
......@@ -4,7 +4,6 @@ output_dir: release
signed_status: unsigned
today: '[% USE date; date.format(format = "%Y-%m-%d") %]'
publish_dir: '[% c("var/signed_status") %]/[% c("version") %]-[% c("var/torbrowser_build") %]'
containers_target: with_containers
......@@ -74,7 +73,7 @@ targets:
output_dir: 'nightly'
build_target: nightly
publish_dir: '[% c("var/today") %]'
publish_dir: '[% c("version") %]'
output_dir: alpha
......@@ -147,7 +147,7 @@ targets:
nightly: 1
channel: nightly
torbrowser_version: tbb-nightly
torbrowser_version: '[% ENV.TORBROWSER_NIGHTLY_VERSION ? ENV.TORBROWSER_NIGHTLY_VERSION : c("var_p/nightly_torbrowser_version") %]'
- testbuild
......@@ -508,5 +508,12 @@ ENV:
my ($out) = capture_exec('sudo', 'runc', '--version');
return $out =~ m/^.*spec: 1\.[0-9]+\.[0-9]+(?:-dev)?$/m;
nightly_torbrowser_version => sub {
state $version = '';
return $version if $version;
my (undef, undef, undef, $day, $mon, $year) = gmtime;
$version = sprintf("tbb-nightly.%u.%02u.%02u", $year + 1900, $mon + 1, $day);
return $version;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment