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