Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull in smaller omnibus sofware defs + expand gem cleanup #1388

Merged
merged 3 commits into from
Aug 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions omnibus/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/chef/omnibus-software.git
revision: 41ddd2e5d20a95fc9ee8344a9cdd57f85dfe47b1
revision: 399369c70d19eaf3ee035da1e4a14bd79b21381d
branch: master
specs:
omnibus-software (4.0.0)
Expand Down Expand Up @@ -32,7 +32,7 @@ GEM
artifactory (3.0.15)
awesome_print (1.8.0)
aws-eventstream (1.1.0)
aws-partitions (1.348.0)
aws-partitions (1.349.0)
aws-sdk-core (3.104.3)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
Expand Down
14 changes: 11 additions & 3 deletions omnibus/config/software/more-ruby-cleanup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,21 @@
# find the embedded ruby gems dir and clean it up for globbing
target_dir = "#{install_dir}/embedded/lib/ruby/gems/*/gems".tr('\\', "/")
files = %w{
.rspec-tm
.sitearchdir.time
*-public_cert.pem
.dockerignore
bootstrap.sh
ci
diagrams
example
examples
ext
Gemfile.lock
java
patches
playbooks
perf
rakelib
sample
samples
Expand All @@ -60,7 +68,7 @@
warning.txt
}

Dir.glob(Dir.glob("#{target_dir}/*/{#{files.join(",")}}")).each do |f|
Dir.glob("#{target_dir}/*/{#{files.join(",")}}").each do |f|
puts "Deleting #{f}"
FileUtils.rm_rf(f)
end
Expand All @@ -76,7 +84,7 @@
tasks
}

Dir.glob(Dir.glob("#{target_dir}/*/{#{files.join(",")}}")).each do |f|
Dir.glob("#{target_dir}/*/{#{files.join(",")}}").each do |f|
# don't delete these files if there's a non-empty bin dir in the same dir
next if Dir.exist?(File.join(File.dirname(f), "bin")) && !Dir.empty?(File.join(File.dirname(f), "bin"))

Expand All @@ -89,7 +97,7 @@
# find the embedded ruby gems dir and clean it up for globbing
target_dir = "#{install_dir}/embedded/lib/ruby/gems/*/gems".tr('\\', "/")

Dir.glob(Dir.glob("#{target_dir}/*/spec")).each do |f|
Dir.glob("#{target_dir}/*/spec").each do |f|

# don't delete these files if we use them in our verify tests
unless File.basename(File.expand_path("..", f)).match?(/^(berkshelf|test-kitchen|chef|chef-cli|chef-apply|chefspec)-\d/)
Expand Down