[Buildbot] Delete package after successful upload. (#1665)

* [Buildbot] Delete package after successful upload.

* Use autodie.

* ;
This commit is contained in:
Nicholas Hastings 2021-12-13 12:52:26 -05:00 committed by Your Name
parent cdfbdcc29d
commit 647e320b57

View File

@ -7,6 +7,7 @@ use File::Copy;
use File::stat;
use File::Temp qw/ tempfile :seekable/;
use Net::FTP;
use autodie qw(:all);
my ($ftp_file, $ftp_host, $ftp_user, $ftp_pass, $ftp_path, $tag);
@ -147,7 +148,13 @@ $ftp->put($tmpfile, $latest)
$ftp->close();
print "File sent to drop site as $filename -- build succeeded.\n";
print "File sent to drop site as $filename.\n";
print "Deleting file \"$filename\"...\n";
unlink($filename) or die "Cannot delete file \"$filename\"\n";
print "Successfully deleted file.\n"
print "Build succeeded.\n"
exit(0);