summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2019-11-15 16:58:27 -0800
committerTim Smith <tsmith84@gmail.com>2019-11-15 16:58:27 -0800
commit8f6052359f1dcbad0e8e4bc5cd149911b2224647 (patch)
tree3b79207e3adfb19d68fe0ed1e4de2d0a2a7df10d
parenta846c6ae160829ff9dd46d9e61137d624e729ea0 (diff)
downloadchef-8f6052359f1dcbad0e8e4bc5cd149911b2224647.tar.gz
Don't ship the extra rake tasks in the gem
We only need the rspec task which gets run from within the gem artifact in the test phase. Skips all the other stuff. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--Rakefile12
-rw-r--r--chef.gemspec5
2 files changed, 12 insertions, 5 deletions
diff --git a/Rakefile b/Rakefile
index 818ac251bb..643d70015b 100644
--- a/Rakefile
+++ b/Rakefile
@@ -17,10 +17,14 @@
# limitations under the License.
#
-require_relative "tasks/rspec"
-require_relative "tasks/dependencies"
-require_relative "tasks/announce"
-require_relative "tasks/docs"
+begin
+ require_relative "tasks/rspec"
+ require_relative "tasks/dependencies"
+ require_relative "tasks/announce"
+ require_relative "tasks/docs"
+rescue LoadError => e
+ puts "Skipping missing rake dep: #{e}"
+end
ENV["CHEF_LICENSE"] = "accept-no-persist"
diff --git a/chef.gemspec b/chef.gemspec
index b5c9d2e71c..3e2928d504 100644
--- a/chef.gemspec
+++ b/chef.gemspec
@@ -58,5 +58,8 @@ Gem::Specification.new do |s|
s.executables = %w{ knife }
s.require_paths = %w{ lib }
- s.files = %w{Gemfile Rakefile LICENSE README.md} + Dir.glob("{lib,tasks,spec}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) } + Dir.glob("*.gemspec")
+ s.files = %w{Gemfile Rakefile LICENSE README.md} +
+ Dir.glob("{lib,spec}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) } +
+ Dir.glob("*.gemspec") +
+ Dir.glob("tasks/rspec.rb")
end