aboutsummaryrefslogtreecommitdiffstats
path: root/lfs-latest-git.php
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2023-12-05 13:12:55 +0800
committerXi Ruoyao <xry111@xry111.site>2023-12-05 13:12:55 +0800
commit73d91ac621a4e59f71ff6664c68c935317f9ce42 (patch)
tree4f9b341370b83d97379a1343a69d13d48cb65740 /lfs-latest-git.php
parent6b6a1b958af3a0e59559e44ad700f761d8a49a09 (diff)
parentdc8572f2413a4d25444bb1237ea2a01dfba60429 (diff)
Merge remote-tracking branch 'origin/trunk' into xry111/arm64
Diffstat (limited to 'lfs-latest-git.php')
-rw-r--r--lfs-latest-git.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lfs-latest-git.php b/lfs-latest-git.php
index c0c7aaea3..162d8d6c8 100644
--- a/lfs-latest-git.php
+++ b/lfs-latest-git.php
@@ -85,8 +85,9 @@ function http_get_file( $url )
exec( "curl --location --silent --max-time 30 $url", $dir );
- $s = implode( "\n", $dir );
- $dir = strip_tags( $s );
+ $dir = implode( "\n", $dir );
+ if ( !preg_match( "/api.github.com/", $url) )
+ $dir = strip_tags( $dir );
return explode( "\n", $dir );
}
@@ -127,6 +128,7 @@ if ( $package == "expect" ) $dirpath = "https://sourceforge.net/projects/exp
if ( $package == "file" ) $dirpath = "https://github.com/file/file/tags";
if ( $package == "flex" ) $dirpath = github("westes/flex");
if ( $package == "flit_core" ) $dirpath = "https://pypi.org/project/flit-core/";
+if ( $package == "setuptools" ) $dirpath = "https://pypi.org/project/setuptools/";
if ( $package == "gcc" ) $dirpath = max_parent( $dirpath, "gcc-" );
if ( $package == "iana-etc" ) $dirpath = github("Mic92/iana-etc");
if ( $package == "intltool" ) $dirpath = "https://launchpad.net/intltool/trunk";
@@ -293,6 +295,9 @@ if ( $package == "zstd" ) $dirpath = github("facebook/zstd");
if ( $package == "flit_core" )
return find_max( $lines, "/flit-core /", "/^.*flit-core ([\d\.]+)$/" );
+ if ( $package == "setuptools" )
+ return find_max( $lines, "/setuptools /", "/^.*setuptools ([\d\.]+)$/" );
+
if ( $package == "procps-ng" )
return find_max( $lines, "/v\d/", "/^.*v([\d\.]+)$/" );