nexus update version number no need v

This commit is contained in:
xiaomlove
2022-08-17 17:56:44 +08:00
parent 0cce250df2
commit c375448f25
+4 -1
View File
@@ -70,7 +70,10 @@ class NexusUpdate extends Command
if ($tag === 'dev') { if ($tag === 'dev') {
$url = "https://github.com/xiaomlove/nexusphp/archive/refs/heads/php8.zip"; $url = "https://github.com/xiaomlove/nexusphp/archive/refs/heads/php8.zip";
} else { } else {
$url = "https://api.github.com/repos/xiaomlove/nexusphp/tarball/v$tag"; if (!str_starts_with($tag, 'v')) {
$tag = "v$tag";
}
$url = "https://api.github.com/repos/xiaomlove/nexusphp/tarball/$tag";
} }
$this->doLog("Specific tag: '$tag', download from '$url' and extra code, includes: " . implode(', ', $includes)); $this->doLog("Specific tag: '$tag', download from '$url' and extra code, includes: " . implode(', ', $includes));
$tmpPath = $this->update->downAndExtractCode($url, $includes); $tmpPath = $this->update->downAndExtractCode($url, $includes);