fix issue caused by removing download link in
authorMichael Wallner <mike@php.net>
Fri, 9 Nov 2018 07:49:47 +0000 (08:49 +0100)
committerMichael Wallner <mike@php.net>
Fri, 9 Nov 2018 07:49:47 +0000 (08:49 +0100)
https://github.com/php/web-pecl/commit/7c59d928941d7912806371ee7121acfd781e2bc2

bin/pecl+sig

index c1c54438364846bf71de04e1113f2d93ac16bb9c..e615e5bf2b8d5c55bc072efd809a3a9fc6bd5bae 100755 (executable)
@@ -72,9 +72,8 @@ function work($url, $dir) {
 
 if (($sxe = simplexml_load_file("https://pecl.php.net/feeds/$what.rss"))) {
        foreach ($sxe->item as $item) {
-               $url = str_replace("http://", "https://", (string) $item->link);
-               $pkg = basename(dirname($url));
-               $ver = basename($url);
+               list($pkg, $ver) = explode(" ", (string) $item->title);
+               $url = sprintf("https://pecl.php.net/get/%s/%s", $pkg, $ver);
                $skp = sprintf("%s/../skip/%s/%s", __DIR__, $pkg, $ver);
                $ext = sprintf("%s/../public/phars/%s/%s-%s.ext.phar", __DIR__, $pkg, $pkg, $ver);
                $dir = dirname($ext);