mirror of
https://github.com/cmderdev/cmder.git
synced 2026-04-15 06:44:31 +08:00
fix: handle links to vendor repo archive URL
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -99,7 +99,11 @@ jobs:
|
||||
if ($vendor.url -match 'github\.com/([^/]+)/([^/]+)/(releases/download|archive)/([^/]+)') {
|
||||
$owner = $Matches[1]
|
||||
$repo = $Matches[2]
|
||||
$pathType = $Matches[3]
|
||||
$tag = $Matches[4]
|
||||
if ($pathType -eq 'archive') {
|
||||
$tag = $tag -replace '\.(?:tar\.gz|tgz|zip)$', ''
|
||||
}
|
||||
$versionLink = "[$($vendor.version)](https://github.com/$owner/$repo/releases/tag/$tag)"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user