mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-02 14:25:41 +08:00
Fix version extraction to fallback on repository name if tag name is absent
This commit is contained in:
@@ -42,12 +42,12 @@ class GitHubTarball implements DownloadTypeInterface, CheckUpdateInterface
|
||||
}
|
||||
if ($match_url === null) {
|
||||
$url = $rel['tarball_url'] ?? null;
|
||||
$version = $rel['tag_name'] ?? null;
|
||||
$version = $rel['tag_name'] ?? $rel['name'] ?? null;
|
||||
break;
|
||||
}
|
||||
if (preg_match("|{$match_url}|", $rel['tarball_url'] ?? '')) {
|
||||
$url = $rel['tarball_url'];
|
||||
$version = $rel['tag_name'] ?? null;
|
||||
$version = $rel['tag_name'] ?? $rel['name'] ?? null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user