diff options
author | Tim Smith <tsmith@chef.io> | 2021-07-14 14:10:23 -0700 |
---|---|---|
committer | John McCrae <john.mccrae@progress.com> | 2021-07-16 15:38:18 -0700 |
commit | 54d1edc24144a1a30eb4779cbeb6b446e9ad8c6e (patch) | |
tree | b905d786c77b713cbed54fcc5ad8764e6978694b | |
parent | f871c9b13cd3ff93f5a56c1b4a0139081d250e0e (diff) | |
download | chef-54d1edc24144a1a30eb4779cbeb6b446e9ad8c6e.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>
-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 |