summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2021-07-14 14:50:28 -0700
committerGitHub <noreply@github.com>2021-07-14 14:50:28 -0700
commit96846b3ec7aa41a57d4d22f4a5cde855d3fc4189 (patch)
treeebb2193a694efa7bfb4092606ee4be442ed67c08
parent144bf0d62519ab0db760ba53f1fbdea883c77b26 (diff)
parenta9c946a549334e59ca2386e2b1543313fed3dcc1 (diff)
downloadchef-96846b3ec7aa41a57d4d22f4a5cde855d3fc4189.tar.gz
Merge pull request #11806 from chef/aws_cleanup
Don't cleanup the VERSION file in the aws gem install
-rw-r--r--omnibus/config/software/more-ruby-cleanup.rb22
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