Commit 0d80c0d7 authored by Daniel Tomlinson's avatar Daniel Tomlinson

Validate the CocoaPods version against the specification

parent 9620191c
...@@ -451,6 +451,7 @@ module Pod ...@@ -451,6 +451,7 @@ module Pod
UI.section "Resolving dependencies of #{UI.path podfile.defined_in_file}" do UI.section "Resolving dependencies of #{UI.path podfile.defined_in_file}" do
resolver = Resolver.new(sandbox, podfile, locked_dependencies, sources) resolver = Resolver.new(sandbox, podfile, locked_dependencies, sources)
specs_by_target = resolver.resolve specs_by_target = resolver.resolve
specs_by_target.values.flatten(1).each(&:validate_cocoapods_version)
end end
specs_by_target specs_by_target
end end
......
...@@ -14,6 +14,7 @@ module Pod ...@@ -14,6 +14,7 @@ module Pod
spec_files.sort_by { |p| -p.to_path.split(File::SEPARATOR).size }.each do |file| spec_files.sort_by { |p| -p.to_path.split(File::SEPARATOR).size }.each do |file|
begin begin
spec = Specification.from_file(file) spec = Specification.from_file(file)
spec.validate_cocoapods_version
@specs_by_name[spec.name] = spec @specs_by_name[spec.name] = spec
rescue => e rescue => e
UI.warn "Unable to load a podspec from `#{file.basename}`, skipping:\n\n#{e}" UI.warn "Unable to load a podspec from `#{file.basename}`, skipping:\n\n#{e}"
......
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