summaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2016-04-18 11:34:18 -0700
committerJohn Keiser <john@johnkeiser.com>2016-04-18 14:21:02 -0700
commit64d524b583b19ae425387a611774c8e70cdc95e5 (patch)
treed4241f13dc6f11c5d6c89f2c5f27c1956e06d0b6 /tasks
parent4225c2b182d093e38347b2a37834336ce09c3e39 (diff)
downloadchef-64d524b583b19ae425387a611774c8e70cdc95e5.tar.gz
Don't lock acceptance for other platforms
Diffstat (limited to 'tasks')
-rw-r--r--tasks/bundle_util.rb4
-rw-r--r--tasks/dependencies.rb14
2 files changed, 10 insertions, 8 deletions
diff --git a/tasks/bundle_util.rb b/tasks/bundle_util.rb
index c2f1ca51e3..a057db858a 100644
--- a/tasks/bundle_util.rb
+++ b/tasks/bundle_util.rb
@@ -25,12 +25,12 @@ module BundleUtil
result
end
- def with_bundle_unfrozen(cwd: nil)
+ def with_bundle_unfrozen(cwd: nil, leave_frozen: false)
bundle "config --delete frozen", cwd: cwd
begin
yield
ensure
- bundle "config --local frozen 1", cwd: cwd
+ bundle "config --local frozen 1", cwd: cwd unless leave_frozen
end
end
diff --git a/tasks/dependencies.rb b/tasks/dependencies.rb
index d383ee4433..fc7f11ec4d 100644
--- a/tasks/dependencies.rb
+++ b/tasks/dependencies.rb
@@ -42,7 +42,7 @@ namespace :dependencies do
end
end
- def gemfile_lock_task(task_name, dirs: [])
+ def gemfile_lock_task(task_name, dirs: [], other_platforms: true, leave_frozen: true)
dirs.each do |dir|
desc "Update #{dir}/Gemfile.lock. #{task_name}[conservative] to update as little as possible."
task task_name, [:conservative] do |t, rake_args|
@@ -52,11 +52,13 @@ namespace :dependencies do
puts "-------------------------------------------------------------------"
puts "Updating #{dir}/Gemfile.lock#{conservative ? " (conservatively)" : ""} ..."
puts "-------------------------------------------------------------------"
- with_bundle_unfrozen(cwd: dir) do
+ with_bundle_unfrozen(cwd: dir, leave_frozen: leave_frozen) do
bundle "install", cwd: dir, delete_gemfile_lock: !conservative
- # Include all other supported platforms into the lockfile as well
- platforms.each do |platform|
- bundle "lock", cwd: dir, platform: platform
+ if other_platforms
+ # Include all other supported platforms into the lockfile as well
+ platforms.each do |platform|
+ bundle "lock", cwd: dir, platform: platform
+ end
end
end
end
@@ -89,7 +91,7 @@ namespace :dependencies do
gemfile_lock_task :update_acceptance_gemfile_lock, dirs: %w{
acceptance
acceptance/fips/test/integration/fips/serverspec
- }
+ }, other_platforms: false, leave_frozen: false
gemfile_lock_task :update_kitchen_tests_gemfile_lock, dirs: %w{
kitchen-tests
kitchen-tests/test/integration/webapp/serverspec