fix build artifacts

pull/501/head
ruki 4 years ago
parent 007d30dd1f
commit b7793b162e
No known key found for this signature in database
GPG Key ID: D7C5BF5691071C8D
  1. 20
      scripts/build_artifacts.lua

@ -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

Loading…
Cancel
Save