Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions win32-registry.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@ Gem::Specification.new do |spec|
# 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
.git* .mailmap appveyor Rakefile Gemfile
]
spec.files = Dir.chdir(__dir__) do
`git ls-files -z`.split("\x0").reject do |f|
File.identical?(f, __FILE__) || f.start_with?(*excludes)
end
end
git_files = %w[git ls-files -z --] + excludes.map {|x| ":^/#{x}"}
spec.files = IO.popen(git_files, chdir: __dir__, &:read).split("\x0")
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
Expand Down