Skip to content

Commit

Permalink
Update test.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi authored Jul 13, 2024
1 parent 3479ce5 commit 72648b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ function get_modified_packages()
end
elseif line:startswith("+") and line:find("add_versions") then
local version = line:match("add_versions%(\"(.-)\"")
if version:find(":", 1, true) then
version = version:split(":")[2]
end
if #packages > 0 and version then
local lastpackage = packages[#packages]
local splitinfo = lastpackage:split("%s+")
Expand All @@ -239,7 +242,7 @@ function get_modified_packages()
end
end
end
return packages
return table.unique(packages)
end

-- the main entry
Expand Down

0 comments on commit 72648b6

Please sign in to comment.