mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
Fix version extraction to fallback on repository name if tag name is absent
This commit is contained in:
parent
84f6dab882
commit
32b7fee8d8
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user