ci: more rockspec patterns

This commit is contained in:
Folke Lemaitre 2024-06-25 18:12:39 +02:00
parent 49c0b86a6f
commit 7cda552c1c
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 10 additions and 1 deletions

View File

@ -5,6 +5,8 @@ local Util = require("lazy.util")
local M = {}
M.patterns = { "nvim", "treesitter", "tree-sitter" }
function M.fetch(url, file, prefix)
if not vim.uv.fs_stat(file) then
print((prefix or "") .. "Fetching " .. url .. " to " .. file .. "\n")
@ -36,7 +38,14 @@ function M.build()
---@type {name:string, version:string, url:string}[]
local nvim_rocks = {}
for rock, vv in pairs(manifest.repository or {}) do
if rock:find("nvim", 1, true) then
local matches = false
for _, pattern in ipairs(M.patterns) do
if rock:find(pattern, 1, true) then
matches = true
break
end
end
if matches then
local versions = vim.tbl_map(Semver.version, vim.tbl_keys(vv))
versions = vim.tbl_filter(function(v)
return not not v