зеркало из https://github.com/github/putty.git
Add a --no-ftp mode to the release.pl download checks.
chiark's ftp server sometimes randomly refuses downloads. In the case where this happens at postcheck time, this isn't really release-blocking (all the files have been test-downloaded by precheck already, so the main aim at this stage is to check that the 'latest' symlink points to the right place, and even one or two successful downloads are good enough to confirm that in practice). So now I can add --no-ftp to the postcheck command line if that makes my life easier.
This commit is contained in:
Родитель
7470e3bdaf
Коммит
0e2955ffbf
16
release.pl
16
release.pl
|
@ -15,11 +15,13 @@ my $setver = 0;
|
|||
my $upload = 0;
|
||||
my $precheck = 0;
|
||||
my $postcheck = 0;
|
||||
my $skip_ftp = 0;
|
||||
GetOptions("version=s" => \$version,
|
||||
"setver" => \$setver,
|
||||
"upload" => \$upload,
|
||||
"precheck" => \$precheck,
|
||||
"postcheck" => \$postcheck)
|
||||
"postcheck" => \$postcheck,
|
||||
"no-ftp" => \$skip_ftp)
|
||||
or &usage();
|
||||
|
||||
# --set-version: construct a local commit which updates the version
|
||||
|
@ -163,11 +165,13 @@ if ($precheck || $postcheck) {
|
|||
}
|
||||
|
||||
# Now test-download the files themselves.
|
||||
my $ftpdata = `curl -s $ftp_uri`;
|
||||
printf " got %d bytes via FTP", length $ftpdata;
|
||||
die "FTP download for $ftp_uri did not match"
|
||||
if $ftpdata ne $real_content;
|
||||
print ", ok\n";
|
||||
unless ($skip_ftp) {
|
||||
my $ftpdata = `curl -s $ftp_uri`;
|
||||
printf " got %d bytes via FTP", length $ftpdata;
|
||||
die "FTP download for $ftp_uri did not match"
|
||||
if $ftpdata ne $real_content;
|
||||
print ", ok\n";
|
||||
}
|
||||
|
||||
my $ua = LWP::UserAgent->new;
|
||||
my $httpresponse = $ua->get($http_uri);
|
||||
|
|
Загрузка…
Ссылка в новой задаче