Commit 237ea8c3 authored by clarkda's avatar clarkda

[Analyzer] Only update git sourced spec repos

parent 15f31daa
...@@ -47,6 +47,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -47,6 +47,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Hugo Tunius](https://github.com/K0nserv) [Hugo Tunius](https://github.com/K0nserv)
[#2823](https://github.com/CocoaPods/CocoaPods/issues/2823) [#2823](https://github.com/CocoaPods/CocoaPods/issues/2823)
* When updating spec repositories only update the git sourced repos.
[Dustin Clark](https://github.com/clarkda)
[#2558](https://github.com/CocoaPods/CocoaPods/issues/2558)
## 0.36.0.beta.1 ## 0.36.0.beta.1
......
...@@ -163,12 +163,12 @@ module Pod ...@@ -163,12 +163,12 @@ module Pod
end end
end end
# Updates the source repositories unless the config indicates to skip it. # Updates the git source repositories unless the config indicates to skip it.
# #
def update_repositories_if_needed def update_repositories_if_needed
unless config.skip_repo_update? unless config.skip_repo_update?
UI.section 'Updating spec repositories' do UI.section 'Updating spec repositories' do
sources.each { |source| SourcesManager.update(source.name) } sources.each { |source| SourcesManager.update(source.name) if SourcesManager.git_repo?(source.repo) }
end end
end end
end end
......
...@@ -71,6 +71,27 @@ module Pod ...@@ -71,6 +71,27 @@ module Pod
@analyzer.analyze @analyzer.analyze
end end
it 'does not update non-git repositories' do
tmp_directory = '/private/tmp/CocoaPods/'
FileUtils.mkdir_p(tmp_directory)
FileUtils.cp_r(ROOT + 'spec/fixtures/spec-repos/test_repo/', tmp_directory)
non_git_repo = tmp_directory + 'test_repo'
podfile = Podfile.new do
platform :ios, '8.0'
xcodeproj 'SampleProject/SampleProject'
pod 'BananaLib', '1.0'
end
config.skip_repo_update = false
SourcesManager.expects(:update).never
analyzer = Pod::Installer::Analyzer.new(config.sandbox, podfile, nil)
analyzer.stubs(:sources).returns([Source.new(non_git_repo)])
analyzer.analyze
FileUtils.rm_rf(non_git_repo)
end
#--------------------------------------# #--------------------------------------#
it 'generates the libraries which represent the target definitions' do it 'generates the libraries which represent the target definitions' do
......
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