Cater to new server configuration for PECL cURL uploads

This commit is contained in:
Christoph M. Becker
2021-10-08 12:56:37 +02:00
parent aed8a0d0ab
commit 18dac6fd90
2 changed files with 5 additions and 3 deletions

View File

@@ -411,9 +411,10 @@ function upload_pecl_pkg_ftp_curl($files, $logs, $target)
$fp = fopen($local_file, "rb");
$local_file = basename($local_file);
$remoteurl = "ftps://" . urlencode($ftp_user) . ":" . urlencode($ftp_password) . "@${ftp_server}${ftp_path}/${local_file}";
$remoteurl = "ftps://" . urlencode($ftp_user) . ":" . urlencode($ftp_password) . "@${ftp_server}:990${ftp_path}/${local_file}";
\curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
\curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
\curl_setopt($ch, CURLOPT_URL, $remoteurl);
\curl_setopt($ch, CURLOPT_UPLOAD, 1);
\curl_setopt($ch, CURLOPT_INFILE, $fp);
@@ -430,9 +431,10 @@ function upload_pecl_pkg_ftp_curl($files, $logs, $target)
$fp = fopen($local_file, "rb");
$local_file = basename($local_file);
$remoteurl = "ftps://" . urlencode($ftp_user) . ":" . urlencode($ftp_password) . "@${ftp_server}${ftp_path}/logs/${local_file}";
$remoteurl = "ftps://" . urlencode($ftp_user) . ":" . urlencode($ftp_password) . "@${ftp_server}:990${ftp_path}/logs/${local_file}";
\curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
\curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
\curl_setopt($ch, CURLOPT_URL, $remoteurl);
\curl_setopt($ch, CURLOPT_UPLOAD, 1);
\curl_setopt($ch, CURLOPT_INFILE, $fp);

View File

@@ -327,7 +327,7 @@ foreach ($builds as $build_name) {
if ($upload) {
try {
$root = $is_snap ? 'snaps' : 'releases';
$target = '/' . $root . '/' . $ext->getUnrealName() . '/' . $ext->getVersion();
$target = '/pecl/' . $root . '/' . $ext->getUnrealName() . '/' . $ext->getVersion();
if ($ext->getName() != $ext->getUnrealName()) {
$real_pkg_file = $pkg_file;