From 64d524b583b19ae425387a611774c8e70cdc95e5 Mon Sep 17 00:00:00 2001 From: John Keiser Date: Mon, 18 Apr 2016 11:34:18 -0700 Subject: Don't lock acceptance for other platforms --- tasks/bundle_util.rb | 4 ++-- tasks/dependencies.rb | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'tasks') 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 -- cgit v1.2.1