1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/optparse] Exclude unnecessary files from the package

https://github.com/ruby/optparse/commit/dfd9380231
This commit is contained in:
Nobuyoshi Nakada 2021-03-29 15:26:18 +09:00
parent 7846f3201a
commit e97f21afcd

View file

@ -23,7 +23,9 @@ Gem::Specification.new do |spec|
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{\A(?:test|spec|features)/}) }
`git ls-files -z`.split("\x0").reject { |f|
f.match(%r{\A(?:(?:test|spec|features)/|Gemfile|\.(?:editor|git))})
}
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }