Permalink
Browse files

Add generation of mmsource-latest download.

  • Loading branch information...
psychonic committed Apr 30, 2017
1 parent 89c6fb3 commit 4403e814073b0d1a6889fc8cc2f07619bc7f9aca
Showing with 17 additions and 0 deletions.
  1. +17 −0 support/buildbot/package.pl
@@ -3,6 +3,7 @@
use strict;
use Cwd;
use File::Basename;
use File::Temp qw/ tempfile :seekable/;
use Net::FTP;
my ($ftp_file, $ftp_host, $ftp_user, $ftp_pass, $ftp_path, $tag);
@@ -70,6 +71,20 @@
system("zip -r $filename addons");
}
my ($tmpfh, $tmpfile) = tempfile();
print $tmpfh $filename;
$tmpfh->seek( 0, SEEK_END );
my $latest = "mmsource-latest-";
if ($^O eq "darwin") {
$latest .= "mac";
}
elsif ($^O =~ /MSWin/) {
$latest .= "windows";
}
else {
$latest .= $^O;
}
my ($major,$minor) = ($version =~ /^(\d+)\.(\d+)/);
$ftp_path .= "/$major.$minor";
@@ -90,6 +105,8 @@
$ftp->binary();
$ftp->put($filename)
or die "Cannot drop file $filename ($ftp_path): " . $ftp->message . "\n";
$ftp->put($tmpfile, $latest)
or die "Cannot drop file $latest ($ftp_path): " . $ftp->message . "\n";
$ftp->close();

0 comments on commit 4403e81

Please sign in to comment.