Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
237ea8c3
Commit
237ea8c3
authored
Jan 20, 2015
by
clarkda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Analyzer] Only update git sourced spec repos
parent
15f31daa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
2 deletions
+26
-2
CHANGELOG.md
CHANGELOG.md
+3
-0
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+2
-2
analyzer_spec.rb
spec/unit/installer/analyzer_spec.rb
+21
-0
No files found.
CHANGELOG.md
View file @
237ea8c3
...
...
@@ -47,6 +47,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Hugo Tunius
](
https://github.com/K0nserv
)
[
#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
...
...
lib/cocoapods/installer/analyzer.rb
View file @
237ea8c3
...
...
@@ -163,12 +163,12 @@ module Pod
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
unless
config
.
skip_repo_update?
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
...
...
spec/unit/installer/analyzer_spec.rb
View file @
237ea8c3
...
...
@@ -71,6 +71,27 @@ module Pod
@analyzer
.
analyze
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment