Skip to content

Commit

Permalink
Exclude unneeded files from gem package
Browse files Browse the repository at this point in the history
  • Loading branch information
bshand committed Nov 22, 2024
1 parent 569aa2b commit 861e3c5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ndr_support.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ Gem::Specification.new do |spec|
spec.homepage = 'https://github.com/PublicHealthEngland/ndr_support'
spec.license = 'MIT'

# Exclude older versions of this gem from the package.
spec.files = `git ls-files -z`.split("\x0").reject { |s| s =~ %r{^(\.github|pkg/)} }
gem_files = %w[CHANGELOG.md CODE_OF_CONDUCT.md LICENSE.txt README.md
lib ndr_support.gemspec]
spec.files = `git ls-files -z`.split("\x0").
select { |f| gem_files.include?(f.split('/')[0]) }
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']
Expand Down

0 comments on commit 861e3c5

Please sign in to comment.