Commit 6b046899 authored by Samuel E. Giddins's avatar Samuel E. Giddins

Store existing checkout options but ignore :head pods

parent e7ee802b
...@@ -465,8 +465,9 @@ module Pod ...@@ -465,8 +465,9 @@ module Pod
# @return [void] # @return [void]
# #
def write_lockfiles def write_lockfiles
# checkout_options = sandbox.checkout_options external_source_pods = podfile.dependencies.select(&:external_source).map(&:root_name).uniq
@lockfile = Lockfile.generate(podfile, analysis_result.specifications, sandbox.checkout_sources) checkout_options = sandbox.checkout_sources.select { |root_name, _| external_source_pods.include? root_name }
@lockfile = Lockfile.generate(podfile, analysis_result.specifications, checkout_options)
UI.message "- Writing Lockfile in #{UI.path config.lockfile_path}" do UI.message "- Writing Lockfile in #{UI.path config.lockfile_path}" do
@lockfile.write_to_disk(config.lockfile_path) @lockfile.write_to_disk(config.lockfile_path)
......
...@@ -53,6 +53,7 @@ module Pod ...@@ -53,6 +53,7 @@ module Pod
@result.podfile_state = generate_podfile_state @result.podfile_state = generate_podfile_state
@locked_dependencies = generate_version_locking_dependencies @locked_dependencies = generate_version_locking_dependencies
store_existing_checkout_options
fetch_external_sources if allow_fetches fetch_external_sources if allow_fetches
@result.specs_by_target = resolve_dependencies @result.specs_by_target = resolve_dependencies
@result.specifications = generate_specifications @result.specifications = generate_specifications
...@@ -335,6 +336,15 @@ module Pod ...@@ -335,6 +336,15 @@ module Pod
end end
end end
def store_existing_checkout_options
podfile.dependencies.select(&:external_source).each do |dep|
if checkout_options = lockfile && lockfile.checkout_options_for_pod_named(dep.root_name)
sandbox.store_checkout_source(dep.root_name, checkout_options)
end
end
end
# Converts the Podfile in a list of specifications grouped by target. # Converts the Podfile in a list of specifications grouped by target.
# #
# @note As some dependencies might have external sources the resolver # @note As some dependencies might have external sources the resolver
......
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