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
332e7bb8
Commit
332e7bb8
authored
Jan 24, 2015
by
Kyle Fuller
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3051 from clarkda/master
[Analyzer] Only update git sourced spec repos
parents
e5e9252a
fcf06acd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
2 deletions
+37
-2
CHANGELOG.md
CHANGELOG.md
+3
-0
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+8
-2
analyzer_spec.rb
spec/unit/installer/analyzer_spec.rb
+26
-0
No files found.
CHANGELOG.md
View file @
332e7bb8
...
@@ -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
...
...
lib/cocoapods/installer/analyzer.rb
View file @
332e7bb8
...
@@ -163,12 +163,18 @@ module Pod
...
@@ -163,12 +163,18 @@ 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
do
|
source
|
if
SourcesManager
.
git_repo?
(
source
.
repo
)
SourcesManager
.
update
(
source
.
name
)
else
UI
.
message
"Skipping `
#{
source
.
name
}
` update because the repository is not a git source repository."
end
end
end
end
end
end
end
end
...
...
spec/unit/installer/analyzer_spec.rb
View file @
332e7bb8
...
@@ -71,6 +71,32 @@ module Pod
...
@@ -71,6 +71,32 @@ 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
config
.
verbose
=
true
source
=
Source
.
new
(
non_git_repo
)
SourcesManager
.
expects
(
:update
).
never
analyzer
=
Pod
::
Installer
::
Analyzer
.
new
(
config
.
sandbox
,
podfile
,
nil
)
analyzer
.
stubs
(
:sources
).
returns
([
source
])
analyzer
.
analyze
UI
.
output
.
should
.
match
/Skipping `
#{
source
.
name
}
` update because the repository is not a git source repository./
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
...
...
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