diff options
author | Tim Smith <tsmith@chef.io> | 2021-07-14 14:10:23 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2021-07-14 14:10:23 -0700 |
commit | a9c946a549334e59ca2386e2b1543313fed3dcc1 (patch) | |
tree | ebb2193a694efa7bfb4092606ee4be442ed67c08 /omnibus | |
parent | 144bf0d62519ab0db760ba53f1fbdea883c77b26 (diff) | |
download | chef-a9c946a549334e59ca2386e2b1543313fed3dcc1.tar.gz |
Don't cleanup the VERSION file in the aws gem install
We need that file. Also remove the fauxhai cleanup since we don't ship
that gem anymore.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'omnibus')
-rw-r--r-- | omnibus/config/software/more-ruby-cleanup.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/omnibus/config/software/more-ruby-cleanup.rb b/omnibus/config/software/more-ruby-cleanup.rb index b875c8a166..ab399b8671 100644 --- a/omnibus/config/software/more-ruby-cleanup.rb +++ b/omnibus/config/software/more-ruby-cleanup.rb @@ -66,7 +66,6 @@ build do script site vendor - VERSION } Dir.glob("#{target_dir}/*/{#{files.join(",")}}").each do |f| @@ -80,6 +79,17 @@ build do end end + block "Removing VERSION files from installed gems" do + # find the embedded ruby gems dir and clean it up for globbing + Dir.glob("#{install_dir}/embedded/lib/ruby/gems/*/gems/*/VERSION".tr("\\", "/")).each do |f| + # we need to not delete the aws SDK VERSION file + next if File.basename(File.expand_path("..", f)).start_with?("aws") + + puts "Deleting #{f}" + FileUtils.rm_rf(f) + end + end + block "Removing Gemspec / Rakefile / Gemfile unless there's a bin dir / not a chef gem" do # find the embedded ruby gems dir and clean it up for globbing target_dir = "#{install_dir}/embedded/lib/ruby/gems/*/gems".tr("\\", "/") @@ -131,14 +141,4 @@ build do end end end - - block "Remove deprecated fauxhai dumps we don't need for running chef-utils specs" do - require "json" - Dir.glob("#{install_dir}/embedded/lib/ruby/gems/*/gems/fauxhai*/lib/fauxhai/platforms/**/*.json") do |file_path| - if JSON.parse(File.read(file_path))["deprecated"] - puts "Deleted deprecated Fauxhai definition at #{file_path}" - FileUtils.rm_f(file_path) - end - end - end end |