Unverified Commit f7ca0b7e authored by Georg Koppen's avatar Georg Koppen
Browse files

Merge remote-tracking branch 'gitlab/merge-requests/38' into master

parents bdcf6b3b 81bae4ad
#!/bin/bash #!/bin/bash
[% c("var/set_default_env") -%] [% c("var/set_default_env") -%]
cd [% shell_quote(path(dest_dir)) %]/[% c("var/signed_status") %]/[% c("version") %] cd [% shell_quote(path(dest_dir)) %]/[% c("var/signed_status") %]/[% c("version") %]
[% shell_quote(c("basedir")) %]/tools/dmg2mar [% shell_quote(c("basedir")) %]/tools/dmg2mar [% c("var/channel") %]
...@@ -103,6 +103,7 @@ sub get_dmg_files_from_sha256sums { ...@@ -103,6 +103,7 @@ sub get_dmg_files_from_sha256sums {
} }
sub convert_files { sub convert_files {
my ($channel) = @_;
my $pm = Parallel::ForkManager->new(get_nbprocs); my $pm = Parallel::ForkManager->new(get_nbprocs);
$pm->run_on_finish(sub { print "Finished $_[2]\n" }); $pm->run_on_finish(sub { print "Finished $_[2]\n" });
foreach my $file (get_dmg_files_from_sha256sums) { foreach my $file (get_dmg_files_from_sha256sums) {
...@@ -140,9 +141,13 @@ sub convert_files { ...@@ -140,9 +141,13 @@ sub convert_files {
find($wanted, "$tmpdir/$appname.app"); find($wanted, "$tmpdir/$appname.app");
unlink $output; unlink $output;
local $ENV{MOZ_PRODUCT_VERSION} = $file->{version};
local $ENV{MAR_CHANNEL_ID} = "torbrowser-torproject-$channel";
(undef, $err, $success) = capture_exec('make_full_update.sh', '-q', (undef, $err, $success) = capture_exec('make_full_update.sh', '-q',
$output, "$tmpdir/$appname.app"); $output, "$tmpdir/$appname.app");
exit_error "Error updating $output: $err" unless $success; exit_error "Error updating $output: $err" unless $success;
exit_error "make_full_update.sh failed. $output does not exist."
unless -f $output;
$pm->finish; $pm->finish;
} }
$pm->wait_all_children; $pm->wait_all_children;
...@@ -164,6 +169,10 @@ sub remove_incremental_mars { ...@@ -164,6 +169,10 @@ sub remove_incremental_mars {
# Set LC_ALL=C to avoid reproducibility issues when creating mar files # Set LC_ALL=C to avoid reproducibility issues when creating mar files
$ENV{LC_ALL} = 'C'; $ENV{LC_ALL} = 'C';
exit_error "Please specify update channel" unless @ARGV == 1;
my $channel = $ARGV[0];
extract_martools; extract_martools;
convert_files; convert_files $channel;
remove_incremental_mars; remove_incremental_mars;
...@@ -230,8 +230,8 @@ sub create_incremental_mar { ...@@ -230,8 +230,8 @@ sub create_incremental_mar {
exit_error "Missing code signature while creating $mar_file"; exit_error "Missing code signature while creating $mar_file";
} }
} }
$ENV{MOZ_PRODUCT_VERSION} = $new_version; local $ENV{MOZ_PRODUCT_VERSION} = $new_version;
$ENV{MAR_CHANNEL_ID} = "torbrowser-torproject-$channel"; local $ENV{MAR_CHANNEL_ID} = "torbrowser-torproject-$channel";
my ($out, $err, $success) = capture_exec('make_incremental_update.sh', my ($out, $err, $success) = capture_exec('make_incremental_update.sh',
$mar_file_path, "$tmpdir/A", "$tmpdir/B"); $mar_file_path, "$tmpdir/A", "$tmpdir/B");
if (!$success) { if (!$success) {
......
Supports Markdown
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