Skip to content

Commit

Permalink
Merge pull request #2132 from chef/fix_cleanup
Browse files Browse the repository at this point in the history
Fix the cleanup of cached gems
  • Loading branch information
tas50 authored Aug 12, 2021
2 parents f496587 + 2eee6cd commit f67f44f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions omnibus/config/software/more-ruby-cleanup-supermarket.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@

build do
block "Delete bundler git cache, docs, and build info" do
vendor_dir = File.expand_path("#{install_dir}/embedded/service/supermarket/vendor/")
remove_directory "#{install_dir}/embedded/service/supermarket/vendor/cache"

remove_directory "#{vendor_dir}/bundle/ruby/*/build_info"
remove_directory "#{vendor_dir}/bundle/ruby/*/cache"
remove_directory "#{vendor_dir}/bundle/ruby/*/doc"
remove_directory "#{vendor_dir}/cache"
# this expands into the appropriate Ruby release number dir
vendor_ruby_dir = File.expand_path("#{install_dir}/embedded/service/supermarket/vendor/bundle/ruby/*")

remove_directory "#{vendor_ruby_dir}/build_info"
remove_directory "#{vendor_ruby_dir}/bundle/ruby/*/cache"
remove_directory "#{vendor_ruby_dir}/bundle/ruby/*/doc"
end
end

0 comments on commit f67f44f

Please sign in to comment.