فهرست منبع

fix build artifacts

ruki 4 سال پیش
والد
کامیت
b7793b162e
1فایلهای تغییر یافته به همراه11 افزوده شده و 9 حذف شده
  1. 11 9
      scripts/build_artifacts.lua

+ 11 - 9
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