From 72b8fa9e03f74ddfa9b32f2916813728c0692615 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 17 Oct 2024 12:06:41 +0900 Subject: [ruby/win32-registry] Exclude rake files from packages [ci skip] https://github.com/ruby/win32-registry/commit/e7b2eeb885 --- ext/win32/win32-registry.gemspec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ext/win32/win32-registry.gemspec b/ext/win32/win32-registry.gemspec index cbac30f221..ac5ff103d3 100644 --- a/ext/win32/win32-registry.gemspec +++ b/ext/win32/win32-registry.gemspec @@ -15,10 +15,13 @@ Gem::Specification.new do |spec| # Specify which files should be added to the gem when it is released. # The `git ls-files -z` loads the files in the RubyGem that have been added into git. + excludes = %w[ + bin/ test/ spec/ features/ rakelib/ + .git .github .mailmap appveyor Rakefile Gemfile + ] spec.files = Dir.chdir(__dir__) do `git ls-files -z`.split("\x0").reject do |f| - (File.expand_path(f) == __FILE__) || - f.start_with?(*%w[bin/ test/ spec/ features/ .git .github .mailmap appveyor Gemfile]) + File.identical?(f, __FILE__) || f.start_with?(*excludes) end end spec.bindir = "exe" -- cgit v1.2.3