|
|
|
@ -43,16 +43,18 @@ function main() |
|
|
|
|
assert(file == file:lower(), "%s must be lower case!", file) |
|
|
|
|
local packagedir = path.directory(file) |
|
|
|
|
local packagename = path.filename(packagedir) |
|
|
|
|
local instance = package.load_from_repository(packagename, nil, packagedir, file) |
|
|
|
|
if instance and packages.is_supported(instance, "windows") |
|
|
|
|
and (instance.is_headeronly and not instance:is_headeronly()) then |
|
|
|
|
local versions = instance:versions() |
|
|
|
|
if versions and #versions > 0 then |
|
|
|
|
table.sort(versions, function (a, b) return semver.compare(a, b) > 0 end) |
|
|
|
|
local version_latest = versions[1] |
|
|
|
|
build_artifacts(instance:name(), table.wrap(version_latest)) |
|
|
|
|
if #path.filename(path.directory(packagedir)) == 1 then |
|
|
|
|
local instance = package.load_from_repository(packagename, nil, packagedir, file) |
|
|
|
|
if instance and packages.is_supported(instance, "windows") |
|
|
|
|
and (instance.is_headeronly and not instance:is_headeronly()) then |
|
|
|
|
local versions = instance:versions() |
|
|
|
|
if versions and #versions > 0 then |
|
|
|
|
table.sort(versions, function (a, b) return semver.compare(a, b) > 0 end) |
|
|
|
|
local version_latest = versions[1] |
|
|
|
|
build_artifacts(instance:name(), table.wrap(version_latest)) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|