mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Remove FTP from release machinery.
We withdrew our FTP download links in July, when chiark's OS upgrade made its previous ftpd go away. We've had no complaints at all about that, so I think it's time to decide that FTP is officially obsolete, and remove it from the script that does the uploads, and from the release checklist.
This commit is contained in:
parent
258a36be31
commit
49aa6c2b08
@ -184,12 +184,9 @@ locally, this is the procedure for putting it up on the web.
|
|||||||
|
|
||||||
- Check that downloads via version-numbered URLs all work:
|
- Check that downloads via version-numbered URLs all work:
|
||||||
../putty/release.pl --version=X.YZ --precheck
|
../putty/release.pl --version=X.YZ --precheck
|
||||||
If this has trouble accessing chiark's ftp server, that is
|
|
||||||
unfortunately normal; add --no-ftp and try again.
|
|
||||||
|
|
||||||
- Switch the 'latest' links over to the new release:
|
- Switch the 'latest' links over to the new release:
|
||||||
* Update the HTTP redirect at the:www/putty/htaccess .
|
* Update the HTTP redirect at the:www/putty/htaccess .
|
||||||
* Update the FTP symlink at chiark:ftp/putty-latest .
|
|
||||||
|
|
||||||
- Now verify that downloads via the 'latest' URLs are all redirected
|
- Now verify that downloads via the 'latest' URLs are all redirected
|
||||||
correctly and work:
|
correctly and work:
|
||||||
|
24
release.pl
24
release.pl
@ -15,13 +15,11 @@ my $setver = 0;
|
|||||||
my $upload = 0;
|
my $upload = 0;
|
||||||
my $precheck = 0;
|
my $precheck = 0;
|
||||||
my $postcheck = 0;
|
my $postcheck = 0;
|
||||||
my $skip_ftp = 0;
|
|
||||||
GetOptions("version=s" => \$version,
|
GetOptions("version=s" => \$version,
|
||||||
"setver" => \$setver,
|
"setver" => \$setver,
|
||||||
"upload" => \$upload,
|
"upload" => \$upload,
|
||||||
"precheck" => \$precheck,
|
"precheck" => \$precheck,
|
||||||
"postcheck" => \$postcheck,
|
"postcheck" => \$postcheck)
|
||||||
"no-ftp" => \$skip_ftp)
|
|
||||||
or &usage();
|
or &usage();
|
||||||
|
|
||||||
# --setver: construct a local commit which updates the version
|
# --setver: construct a local commit which updates the version
|
||||||
@ -76,8 +74,7 @@ if ($upload) {
|
|||||||
or die "could not upload link maps";
|
or die "could not upload link maps";
|
||||||
|
|
||||||
for my $location (["thyestes", "www/putty/$version"],
|
for my $location (["thyestes", "www/putty/$version"],
|
||||||
["the", "www/putty/$version"],
|
["the", "www/putty/$version"]) {
|
||||||
["chiark", "ftp/putty-$version"]) {
|
|
||||||
my ($host, $path) = @$location;
|
my ($host, $path) = @$location;
|
||||||
0 == system("rsync", "-av", "putty/", "$host:$path")
|
0 == system("rsync", "-av", "putty/", "$host:$path")
|
||||||
or die "could not upload release to $host";
|
or die "could not upload release to $host";
|
||||||
@ -109,7 +106,7 @@ if ($upload) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# --precheck and --postcheck: attempt to download the release from its
|
# --precheck and --postcheck: attempt to download the release from its
|
||||||
# various web and FTP locations.
|
# various locations.
|
||||||
if ($precheck || $postcheck) {
|
if ($precheck || $postcheck) {
|
||||||
defined $version or die "use --version";
|
defined $version or die "use --version";
|
||||||
|
|
||||||
@ -118,7 +115,6 @@ if ($precheck || $postcheck) {
|
|||||||
-d "putty" or die "no putty directory in cwd";
|
-d "putty" or die "no putty directory in cwd";
|
||||||
|
|
||||||
my $httpprefix = "https://the.earth.li/~sgtatham/putty/";
|
my $httpprefix = "https://the.earth.li/~sgtatham/putty/";
|
||||||
my $ftpprefix = "ftp://ftp.chiark.greenend.org.uk/users/sgtatham/putty-";
|
|
||||||
|
|
||||||
# Go through all the files in build.out.
|
# Go through all the files in build.out.
|
||||||
find({ wanted => sub
|
find({ wanted => sub
|
||||||
@ -140,35 +136,23 @@ if ($precheck || $postcheck) {
|
|||||||
|
|
||||||
my $http_numbered = "${httpprefix}$version/$path";
|
my $http_numbered = "${httpprefix}$version/$path";
|
||||||
my $http_latest = "${httpprefix}latest/$path";
|
my $http_latest = "${httpprefix}latest/$path";
|
||||||
my $ftp_numbered = "${ftpprefix}$version/$path";
|
|
||||||
my $ftp_latest = "${ftpprefix}latest/$path";
|
|
||||||
|
|
||||||
my ($http_uri, $ftp_uri);
|
my $http_uri;
|
||||||
|
|
||||||
if ($precheck) {
|
if ($precheck) {
|
||||||
# Before the 'latest' links/redirects update,
|
# Before the 'latest' links/redirects update,
|
||||||
# we just download from explicitly version-
|
# we just download from explicitly version-
|
||||||
# numbered URLs.
|
# numbered URLs.
|
||||||
$http_uri = $http_numbered;
|
$http_uri = $http_numbered;
|
||||||
$ftp_uri = $ftp_numbered;
|
|
||||||
}
|
}
|
||||||
if ($postcheck) {
|
if ($postcheck) {
|
||||||
# After 'latest' is updated, we're testing that
|
# After 'latest' is updated, we're testing that
|
||||||
# the redirects work, so we download from the
|
# the redirects work, so we download from the
|
||||||
# URLs with 'latest' in them.
|
# URLs with 'latest' in them.
|
||||||
$http_uri = $http_latest;
|
$http_uri = $http_latest;
|
||||||
$ftp_uri = $ftp_latest;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Now test-download the files themselves.
|
# Now test-download the files themselves.
|
||||||
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 $ua = LWP::UserAgent->new;
|
||||||
my $httpresponse = $ua->get($http_uri);
|
my $httpresponse = $ua->get($http_uri);
|
||||||
my $httpdata = $httpresponse->{_content};
|
my $httpdata = $httpresponse->{_content};
|
||||||
|
Loading…
Reference in New Issue
Block a user