Skip to content

Commit

Permalink
Exclude unnecessary files from the package
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Mar 29, 2021
1 parent 06f74a3 commit dfd9380
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion optparse.gemspec
Expand Up @@ -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) }
Expand Down

0 comments on commit dfd9380

Please sign in to comment.