Commit 2e081a3c authored by Samuel E. Giddins's avatar Samuel E. Giddins

Allows the usage of `:head` dependencies even when the most recent published…

Allows the usage of `:head` dependencies even when the most recent published version was a pre-release.

Closes https://github.com/CocoaPods/CocoaPods/issues/3212.
parent c2eabdb0
...@@ -12,10 +12,15 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -12,10 +12,15 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Boris Bügling](https://github.com/neonichu) [Boris Bügling](https://github.com/neonichu)
* Fixes warnings, when the aggregate target doesn't contain any pod target, which is build, * Fixes warnings, when the aggregate target doesn't contain any pod target, which is build,
because `PODS_FRAMEWORK_BUILD_PATH` was added to `FRAMEWORK_SEARCH_PATHS`, but never created. because `PODS_FRAMEWORK_BUILD_PATH` was added to `FRAMEWORK_SEARCH_PATHS`, but never created.
[Marius Rackwitz](https://github.com/mrackwitz) [Marius Rackwitz](https://github.com/mrackwitz)
[#3217](https://github.com/CocoaPods/CocoaPods/issues/3217) [#3217](https://github.com/CocoaPods/CocoaPods/issues/3217)
* Allows the usage of `:head` dependencies even when the most recent published
version was a pre-release.
[Samuel Giddins](https://github.com/segiddins)
[#3212](https://github.com/CocoaPods/CocoaPods/issues/3212)
## 0.36.0.rc.1 ## 0.36.0.rc.1
......
...@@ -180,7 +180,7 @@ module Pod ...@@ -180,7 +180,7 @@ module Pod
end end
requirement_satisfied && !( requirement_satisfied && !(
spec.version.prerelease? && spec.version.prerelease? &&
existing_vertices.flat_map(&:requirements).none? { |r| r.prerelease? || r.external_source } existing_vertices.flat_map(&:requirements).none? { |r| r.prerelease? || r.external_source || r.head? }
) )
end end
......
...@@ -287,6 +287,25 @@ module Pod ...@@ -287,6 +287,25 @@ module Pod
] ]
end end
it 'allows pre-release spec versions when a requirement has a ' \
'HEAD source' do
@podfile = Podfile.new do
platform :ios
pod 'MainSpec', :head
end
spec = Spec.new do |s|
s.name = 'MainSpec'
s.version = '1.2.3-pre'
s.platform = :ios
end
resolver = Resolver.new(config.sandbox, @podfile, empty_graph, SourcesManager.all)
resolver.expects(:find_cached_set).returns(Specification::Set::Head.new(spec))
specs = resolver.resolve.values.flatten.map(&:to_s).sort
specs.should == [
'MainSpec (HEAD based on 1.2.3-pre)',
]
end
it "marks a specification's version to be a HEAD version" do it "marks a specification's version to be a HEAD version" do
podfile = Podfile.new do podfile = Podfile.new do
platform :ios platform :ios
......
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