Better xmake dephash (thanks )
@@ -108,20 +108,8 @@ option("installpath")
task("dephash")
on_run(function()
- import("core.project.project")
- import("private.action.require.impl.package")
-
- local requires, requires_extra = project.requires_str()
-
- local key = {}
- for _, instance in irpairs(package.load_packages(requires, {requires_extra = requires_extra})) do
- table.insert(key, instance:name() .. "-" .. instance:version_str() .. "-" .. instance:buildhash())
- end
-
- table.sort(key)
-
- key = table.concat(key, ",")
- print(hash.uuid4(key):gsub('-', ''):lower())
+ import("utils.ci")
+ ci.packageskey()
end)
set_menu {
