diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-03-23 18:22:17 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2024-03-23 10:34:57 +0000 |
commit | 14fba5a78499a3a797ec5f27fe697ffa763955f5 (patch) | |
tree | 15e0b295eebde6e9443d8f009187adaaaca22b19 /ext | |
parent | a8075caa4e7681ca274d474cdc15fbeee9ad9d2a (diff) | |
download | ruby-14fba5a78499a3a797ec5f27fe697ffa763955f5.tar.gz |
[ruby/win32ole] Exclude unused files from packages
https://github.com/ruby/win32ole/commit/f4aff99dda
Diffstat (limited to 'ext')
-rw-r--r-- | ext/win32ole/win32ole.gemspec | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/win32ole/win32ole.gemspec b/ext/win32ole/win32ole.gemspec index 9c137a5d70..e9abb576ff 100644 --- a/ext/win32ole/win32ole.gemspec +++ b/ext/win32ole/win32ole.gemspec @@ -23,9 +23,11 @@ Gem::Specification.new do |spec| spec.metadata["homepage_uri"] = spec.homepage spec.metadata["source_code_uri"] = spec.homepage - spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do - `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } - end + cmd = %W[git ls-files -z -- + :^#{File.basename(__FILE__)} + :^/bin/ :^/test/ :^/rakelib/ :^/.git* :^Gemfile* :^Rakefile* + ] + spec.files = IO.popen(cmd, chdir: __dir__, err: IO::NULL, exception: false, &:read).split("\x0") spec.bindir = "exe" spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] |