Commit 340d124d authored by Matthew Finkel's avatar Matthew Finkel
Browse files

Bug 40045: Fix complete .mar file creation for dmg2mar

parent 3a845c42
#!/bin/bash
[% c("var/set_default_env") -%]
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 {
}
sub convert_files {
my ($channel) = @_;
my $pm = Parallel::ForkManager->new(get_nbprocs);
$pm->run_on_finish(sub { print "Finished $_[2]\n" });
foreach my $file (get_dmg_files_from_sha256sums) {
......@@ -140,9 +141,13 @@ sub convert_files {
find($wanted, "$tmpdir/$appname.app");
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',
$output, "$tmpdir/$appname.app");
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->wait_all_children;
......@@ -164,6 +169,10 @@ sub remove_incremental_mars {
# Set LC_ALL=C to avoid reproducibility issues when creating mar files
$ENV{LC_ALL} = 'C';
exit_error "Please specify update channel" unless @ARGV == 1;
my $channel = $ARGV[0];
extract_martools;
convert_files;
convert_files $channel;
remove_incremental_mars;
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