Commit 55141923 authored by Luke Redpath's avatar Luke Redpath

Use pods to generate lockfile.

parent db65b82c
...@@ -93,7 +93,7 @@ module Pod ...@@ -93,7 +93,7 @@ module Pod
target_installer.install!(pods, sandbox) target_installer.install!(pods, sandbox)
end end
generate_lock_file! generate_lock_file!(pods)
puts "* Running post install hooks" if config.verbose? puts "* Running post install hooks" if config.verbose?
# Post install hooks run _before_ saving of project, so that they can alter it before saving. # Post install hooks run _before_ saving of project, so that they can alter it before saving.
...@@ -107,11 +107,11 @@ module Pod ...@@ -107,11 +107,11 @@ module Pod
project.save_as(projpath) project.save_as(projpath)
end end
def generate_lock_file! def generate_lock_file!(pods)
lock_file.open('w') do |file| lock_file.open('w') do |file|
file.puts "PODS:" file.puts "PODS:"
pods = build_specifications.map do |spec| pods.map do |pod|
[spec.to_s, spec.dependencies.map(&:to_s).sort] [pod.specification.to_s, pod.specification.dependencies.map(&:to_s).sort]
end.sort_by(&:first).each do |name, deps| end.sort_by(&:first).each do |name, deps|
if deps.empty? if deps.empty?
file.puts " - #{name}" file.puts " - #{name}"
......
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