[rubygems/rubygems] Simplify the gem package file filter in the gemspec template
The regular expression is difficult to understand at a glance. Let's replace it with a much simpler string comparison. https://github.com/rubygems/rubygems/commit/a3745aa03f
This commit is contained in:
parent
ce476cdfb7
commit
573522bd84
@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
||||
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
||||
spec.files = Dir.chdir(__dir__) do
|
||||
`git ls-files -z`.split("\x0").reject do |f|
|
||||
(File.expand_path(f) == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
|
||||
(File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin test spec features .git .circleci appveyor])
|
||||
end
|
||||
end
|
||||
spec.bindir = "exe"
|
||||
|
Loading…
x
Reference in New Issue
Block a user