diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-05-05 21:25:25 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-05-05 21:25:25 -0700 |
commit | fdfc4c3968ec8ebe5b20e0afcb38af202ce6992f (patch) | |
tree | cba2de72505d47efe8d4f121318b3afdd07351c4 | |
parent | ec53e5ff30344216700ae42f72883477661feb91 (diff) | |
download | chef-fdfc4c3968ec8ebe5b20e0afcb38af202ce6992f.tar.gz |
Delete unnecessary gem bin/console and bin/setup files
There's no need for these in gems we ship. There's a bunch of them.
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | omnibus/config/software/more-ruby-cleanup.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/omnibus/config/software/more-ruby-cleanup.rb b/omnibus/config/software/more-ruby-cleanup.rb index 5ffbb43452..019d82d6df 100644 --- a/omnibus/config/software/more-ruby-cleanup.rb +++ b/omnibus/config/software/more-ruby-cleanup.rb @@ -25,6 +25,15 @@ license :project_license source path: "#{project.files_path}/#{name}" build do + block "Removing console and setup binaries" do + Dir.glob("#{install_dir}/embedded/lib/ruby/gems/*/gems/*/bin/{console,setup}").each do |f| + puts "Deleting #{f}" + FileUtils.rm_rf(f) + end + end +end + +build do block "Removing additional non-code files from installed gems" do # find the embedded ruby gems dir and clean it up for globbing target_dir = "#{install_dir}/embedded/lib/ruby/gems/*/gems".tr('\\', "/") |