Commit 2cbb17da authored by Stan Hu's avatar Stan Hu

Merge branch 'load-knapsack-if-defined' into 'master'

Load knapsack in Rakefile only when is bundled

Fixes `production` builds: https://dev.gitlab.org/gitlab/omnibus-gitlab/builds/85407

cc @marin 

See merge request !4514
parents babf20c8 88b0a9ef
...@@ -308,6 +308,7 @@ group :development, :test do ...@@ -308,6 +308,7 @@ group :development, :test do
gem 'benchmark-ips', require: false gem 'benchmark-ips', require: false
gem "license_finder", require: false gem "license_finder", require: false
gem 'knapsack'
end end
group :test do group :test do
...@@ -316,7 +317,6 @@ group :test do ...@@ -316,7 +317,6 @@ group :test do
gem 'webmock', '~> 1.21.0' gem 'webmock', '~> 1.21.0'
gem 'test_after_commit', '~> 0.4.2' gem 'test_after_commit', '~> 0.4.2'
gem 'sham_rack' gem 'sham_rack'
gem 'knapsack'
end end
group :production do group :production do
......
...@@ -3,11 +3,10 @@ ...@@ -3,11 +3,10 @@
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__) require File.expand_path('../config/application', __FILE__)
require 'knapsack'
relative_url_conf = File.expand_path('../config/initializers/relative_url', __FILE__) relative_url_conf = File.expand_path('../config/initializers/relative_url', __FILE__)
require relative_url_conf if File.exist?("#{relative_url_conf}.rb") require relative_url_conf if File.exist?("#{relative_url_conf}.rb")
Gitlab::Application.load_tasks Gitlab::Application.load_tasks
Knapsack.load_tasks Knapsack.load_tasks if defined?(Knapsack)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment