bundle update bundler-multilock
Change-Id: I7aadc6f6dcda29253f9bdaba3c60ea5b13b37ce6 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328971 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Aaron Ogata <aogata@instructure.com> Build-Review: Aaron Ogata <aogata@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
parent
bd0097b762
commit
364813cd06
2
Gemfile
2
Gemfile
|
@ -15,7 +15,7 @@ source "https://rubygems.org/"
|
|||
Plugin.uninstall(["bundler_lockfile_extensions"], {}) if Plugin.installed?("bundler_lockfile_extensions")
|
||||
|
||||
# vendored until https://github.com/rubygems/rubygems/pull/6957 is merged and released
|
||||
plugin "bundler-multilock", "1.0.10", path: "vendor/gems/bundler-multilock"
|
||||
plugin "bundler-multilock", "1.0.11", path: "vendor/gems/bundler-multilock"
|
||||
# the extra check here is in case `bundle check` or `bundle exec` gets run before `bundle install`,
|
||||
# and is also fixed by the same PR
|
||||
raise GemNotFound, "bundler-multilock plugin is not installed" if !is_a?(Bundler::Plugin::DSL) && !Plugin.installed?("bundler-multilock")
|
||||
|
|
|
@ -243,7 +243,10 @@ module Bundler
|
|||
end
|
||||
end
|
||||
lockfile.instance_variable_set(:@ruby_version, default_lockfile.ruby_version)
|
||||
unless lockfile.bundler_version == default_lockfile.bundler_version
|
||||
unlocking_bundler = true
|
||||
lockfile.instance_variable_set(:@bundler_version, default_lockfile.bundler_version)
|
||||
end
|
||||
|
||||
new_contents = LockfileGenerator.generate(lockfile)
|
||||
else
|
||||
|
@ -261,7 +264,8 @@ module Bundler
|
|||
had_changes = write_lockfile(lockfile_definition,
|
||||
temp_lockfile.path,
|
||||
install: install,
|
||||
dependency_changes: dependency_changes)
|
||||
dependency_changes: dependency_changes,
|
||||
unlocking_bundler: unlocking_bundler)
|
||||
end
|
||||
|
||||
# if we had changes, bundler may have updated some common
|
||||
|
@ -375,7 +379,7 @@ module Bundler
|
|||
true
|
||||
end
|
||||
|
||||
def write_lockfile(lockfile_definition, lockfile, install:, dependency_changes: false)
|
||||
def write_lockfile(lockfile_definition, lockfile, install:, dependency_changes: false, unlocking_bundler: false)
|
||||
prepare_block = lockfile_definition[:prepare]
|
||||
|
||||
gemfile = lockfile_definition[:gemfile]
|
||||
|
@ -385,7 +389,7 @@ module Bundler
|
|||
builder.eval_gemfile(gemfile, &prepare_block) if prepare_block
|
||||
builder.eval_gemfile(gemfile)
|
||||
|
||||
definition = builder.to_definition(lockfile, {})
|
||||
definition = builder.to_definition(lockfile, { bundler: unlocking_bundler })
|
||||
definition.instance_variable_set(:@dependency_changes, dependency_changes) if dependency_changes
|
||||
orig_definition = definition.dup # we might need it twice
|
||||
|
||||
|
@ -393,7 +397,7 @@ module Bundler
|
|||
if current_lockfile.exist?
|
||||
definition.instance_variable_set(:@lockfile_contents, current_lockfile.read)
|
||||
if install
|
||||
current_definition = builder.to_definition(current_lockfile, {})
|
||||
current_definition = builder.to_definition(current_lockfile, { bundler: unlocking_bundler })
|
||||
begin
|
||||
current_definition.resolve_with_cache!
|
||||
if current_definition.missing_specs.any?
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
module Bundler
|
||||
module Multilock
|
||||
VERSION = "1.0.10"
|
||||
VERSION = "1.0.11"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue