From 7b90773d47d4949a9fa4cea478ba0bd049424fae Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Thu, 21 Nov 2024 22:45:01 +0900 Subject: [PATCH] Use GitHub workflow setting for dependency definition --- bindings/ruby/extsources.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bindings/ruby/extsources.rb b/bindings/ruby/extsources.rb index 25bbaa58963..1dc900d41b7 100644 --- a/bindings/ruby/extsources.rb +++ b/bindings/ruby/extsources.rb @@ -1,4 +1,6 @@ -EXTSOURCES = `git ls-files -z ../..`.split("\x0").grep(%r{\A\.\./\.\./(?:src|include|ggml).+\.(c|cpp|h|m|metal)\z}) << - "../../examples/dr_wav.h" << - "../../scripts/get-flags.mk" << - "../../LICENSE" +require "yaml" + +sources = `git ls-files -z ../..`.split("\x0") +paths = YAML.load_file("../../.github/workflows/bindings-ruby.yml")[true]["push"]["paths"] +paths.delete "bindings/ruby/**" +EXTSOURCES = (Dir.glob(paths, base: "../..").collect {|path| "../../#{path}"} << "../../LICENSE") & sources