From e6b7a258516d9f247ada37e90454a81f5a1ab42e Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 11 Oct 2023 22:30:27 +0800 Subject: [PATCH] fix ci and scripts --- .github/workflows/sync_packagerefs.yml | 2 ++ scripts/build_artifacts.lua | 13 ++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/sync_packagerefs.yml b/.github/workflows/sync_packagerefs.yml index d32882f03..abec7feeb 100644 --- a/.github/workflows/sync_packagerefs.yml +++ b/.github/workflows/sync_packagerefs.yml @@ -28,5 +28,7 @@ jobs: - name: Build artifacts for packagerefs run: | + git config --global user.email "waruqi@gmail.com" + git config --global user.name "ruki" xmake l scripts/build_artifacts.lua true diff --git a/scripts/build_artifacts.lua b/scripts/build_artifacts.lua index fb988d314..3b2a48147 100644 --- a/scripts/build_artifacts.lua +++ b/scripts/build_artifacts.lua @@ -98,11 +98,13 @@ end function _get_packagerefs_of(instance) local packagerefs = {} - local packages = _get_all_packages() - for _, packageref in ipairs(packages) do - local deps = packageref:get("deps") - if deps and table.contains(table.wrap(deps), instance:name()) then - table.insert(packagerefs, packageref) + if instance:is_library() then + local packages = _get_all_packages() + for _, packageref in ipairs(packages) do + local deps = packageref:get("deps") + if deps and table.contains(table.wrap(deps), instance:name()) then + table.insert(packagerefs, packageref) + end end end return packagerefs @@ -155,6 +157,7 @@ end function main(updaterefs) local instances = updaterefs and _get_packagerefs_in_latest_24h() or _get_latest_modified_packages() + os.exit() for _, instance in ipairs(instances) do local versions = instance:versions() if versions and #versions > 0 then