ci: fix some github urls

This commit is contained in:
Folke Lemaitre 2024-06-25 17:48:04 +02:00
parent 8abfed457c
commit 88911547e7
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 5 additions and 4 deletions

View file

@ -68,10 +68,11 @@ function M.build()
if rockspec then
local url = rockspec.source and rockspec.source.url
-- parse github short url
if url and url:find("^%a+://github.com/") then
url = url:gsub("^%a+://github.com/", "")
if url and url:find("://github.com/") then
url = url:gsub("^.*://github.com/", "")
local parts = vim.split(url, "/")
url = parts[1] .. "/" .. parts[2]
url = url:gsub("%.git$", "")
end
if url then
rock.url = url