From c375448f2573d31fb69d901e38f2b68487bb8997 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Wed, 17 Aug 2022 17:56:44 +0800 Subject: [PATCH] nexus update version number no need v --- app/Console/Commands/NexusUpdate.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/NexusUpdate.php b/app/Console/Commands/NexusUpdate.php index 0c59603d..8d281b2d 100644 --- a/app/Console/Commands/NexusUpdate.php +++ b/app/Console/Commands/NexusUpdate.php @@ -70,7 +70,10 @@ class NexusUpdate extends Command if ($tag === 'dev') { $url = "https://github.com/xiaomlove/nexusphp/archive/refs/heads/php8.zip"; } 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)); $tmpPath = $this->update->downAndExtractCode($url, $includes);