diff options
author | John Keiser <john@johnkeiser.com> | 2016-09-19 13:54:25 -0700 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2016-09-19 14:06:42 -0700 |
commit | b3fbf6d0df79d7f9f908c1507a7451d1a906c45f (patch) | |
tree | 6f29ac717ce9141b533bec0beeef259fcecaf0c0 /omnibus | |
parent | ed21f8cff3d816394fb50258e1ea27ac2fc89a5a (diff) | |
download | chef-jk/cleanup-bundler.tar.gz |
Actually clean up bundler filesjk/cleanup-bundler
Diffstat (limited to 'omnibus')
-rw-r--r-- | omnibus/config/software/chef-cleanup.rb | 30 | ||||
-rw-r--r-- | omnibus/config/software/chef-complete.rb | 2 | ||||
-rw-r--r-- | omnibus/config/software/chef-remove-docs.rb | 34 | ||||
-rw-r--r-- | omnibus/files/chef/build-chef.rb | 7 |
4 files changed, 31 insertions, 42 deletions
diff --git a/omnibus/config/software/chef-cleanup.rb b/omnibus/config/software/chef-cleanup.rb new file mode 100644 index 0000000000..302e841699 --- /dev/null +++ b/omnibus/config/software/chef-cleanup.rb @@ -0,0 +1,30 @@ +name "chef-cleanup" +default_version "local_source" + +license :project_license +skip_transitive_dependency_licensing true + +source path: project.files_path + +dependency "chef" + +build do + # This is where we get the definitions below + require_relative "../../files/chef/build-chef" + extend BuildChef + + # Clear the now-unnecessary git caches, cached gems, and git-checked-out gems + block "Delete bundler git cache and git installs" do + gemdir = shellout!("#{gem_bin} environment gemdir", env: env).stdout.chomp + remove_directory "#{gemdir}/cache" + remove_directory "#{gemdir}/bundler" + end + + delete "#{install_dir}/embedded/docs" + delete "#{install_dir}/embedded/share/man" + delete "#{install_dir}/embedded/share/doc" + delete "#{install_dir}/embedded/share/gtk-doc" + delete "#{install_dir}/embedded/ssl/man" + delete "#{install_dir}/embedded/man" + delete "#{install_dir}/embedded/info" +end diff --git a/omnibus/config/software/chef-complete.rb b/omnibus/config/software/chef-complete.rb index 8ca370c832..4e2b9f6ec2 100644 --- a/omnibus/config/software/chef-complete.rb +++ b/omnibus/config/software/chef-complete.rb @@ -5,7 +5,7 @@ skip_transitive_dependency_licensing true dependency "chef" dependency "chef-appbundle" -dependency "chef-remove-docs" +dependency "chef-cleanup" dependency "gem-permissions" dependency "shebang-cleanup" diff --git a/omnibus/config/software/chef-remove-docs.rb b/omnibus/config/software/chef-remove-docs.rb deleted file mode 100644 index 31e2797afd..0000000000 --- a/omnibus/config/software/chef-remove-docs.rb +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright 2012-2014 Chef Software, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -name "chef-remove-docs" - -license :project_license -skip_transitive_dependency_licensing true - -build do - # This is where we get the definitions below - require_relative "../../files/chef/build-chef" - extend BuildChef - - delete "#{install_dir}/embedded/docs" - delete "#{install_dir}/embedded/share/man" - delete "#{install_dir}/embedded/share/doc" - delete "#{install_dir}/embedded/share/gtk-doc" - delete "#{install_dir}/embedded/ssl/man" - delete "#{install_dir}/embedded/man" - delete "#{install_dir}/embedded/info" -end diff --git a/omnibus/files/chef/build-chef.rb b/omnibus/files/chef/build-chef.rb index 6ff9ca755a..ba7a84c791 100644 --- a/omnibus/files/chef/build-chef.rb +++ b/omnibus/files/chef/build-chef.rb @@ -123,12 +123,5 @@ module BuildChef # Freeze the location's Gemfile.lock. create_bundle_config(shared_gemfile, frozen: true) - - # Clear the now-unnecessary git caches, cached gems, and git-checked-out gems - block "Delete bundler git cache and git installs" do - gemdir = shellout!("#{gem_bin} environment gemdir", env: env).stdout.chomp - remove_file "#{gemdir}/cache" - remove_file "#{gemdir}/bundler" - end end end |