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
77d30006
Commit
77d30006
authored
Nov 18, 2014
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow checkout options to be used for :head pods
parent
9daf7749
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+10
-0
pod_source_installer.rb
lib/cocoapods/installer/pod_source_installer.rb
+2
-2
resolver.rb
lib/cocoapods/resolver.rb
+5
-4
No files found.
lib/cocoapods/installer/analyzer.rb
View file @
77d30006
...
@@ -53,6 +53,8 @@ module Pod
...
@@ -53,6 +53,8 @@ module Pod
@result
.
podfile_state
=
generate_podfile_state
@result
.
podfile_state
=
generate_podfile_state
@locked_dependencies
=
generate_version_locking_dependencies
@locked_dependencies
=
generate_version_locking_dependencies
store_existing_checkout_options
fetch_external_sources
if
allow_fetches
fetch_external_sources
if
allow_fetches
@result
.
specs_by_target
=
resolve_dependencies
@result
.
specs_by_target
=
resolve_dependencies
@result
.
specifications
=
generate_specifications
@result
.
specifications
=
generate_specifications
...
@@ -335,6 +337,14 @@ module Pod
...
@@ -335,6 +337,14 @@ module Pod
end
end
end
end
def
store_existing_checkout_options
podfile
.
dependencies
.
select
{
|
d
|
d
.
external_source
||
d
.
head?
}.
each
do
|
dep
|
if
checkout_options
=
lockfile
&&
lockfile
.
checkout_options_for_pod_named
(
dep
.
root_name
)
sandbox
.
store_checkout_source
(
dep
.
root_name
,
checkout_options
)
end
end
end
# Converts the Podfile in a list of specifications grouped by target.
# Converts the Podfile in a list of specifications grouped by target.
#
#
# @note As some dependencies might have external sources the resolver
# @note As some dependencies might have external sources the resolver
...
...
lib/cocoapods/installer/pod_source_installer.rb
View file @
77d30006
...
@@ -81,7 +81,7 @@ module Pod
...
@@ -81,7 +81,7 @@ module Pod
#
#
def
download_source
def
download_source
root
.
rmtree
if
root
.
exist?
root
.
rmtree
if
root
.
exist?
if
head_pod?
if
head_pod?
&&
!
sandbox
.
checkout_sources
[
root_spec
.
name
]
begin
begin
downloader
.
download_head
downloader
.
download_head
@specific_source
=
downloader
.
checkout_options
@specific_source
=
downloader
.
checkout_options
...
@@ -148,7 +148,7 @@ module Pod
...
@@ -148,7 +148,7 @@ module Pod
# source.
# source.
#
#
def
downloader
def
downloader
@downloader
||=
Downloader
.
for_target
(
root
,
root_spec
.
source
.
dup
)
@downloader
||=
Downloader
.
for_target
(
root
,
sandbox
.
checkout_sources
[
root_spec
.
name
]
||
root_spec
.
source
.
dup
)
end
end
#-----------------------------------------------------------------------#
#-----------------------------------------------------------------------#
...
...
lib/cocoapods/resolver.rb
View file @
77d30006
...
@@ -302,7 +302,10 @@ module Pod
...
@@ -302,7 +302,10 @@ module Pod
def
find_cached_set
(
dependency
)
def
find_cached_set
(
dependency
)
name
=
dependency
.
root_name
name
=
dependency
.
root_name
unless
cached_sets
[
name
]
unless
cached_sets
[
name
]
if
dependency
.
external_source
if
dependency
.
head?
spec
=
create_set_from_sources
(
dependency
).
specification
set
=
Specification
::
Set
::
Head
.
new
(
spec
)
elsif
dependency
.
external_source
spec
=
sandbox
.
specification
(
name
)
spec
=
sandbox
.
specification
(
name
)
unless
spec
unless
spec
raise
StandardError
,
'[Bug] Unable to find the specification '
\
raise
StandardError
,
'[Bug] Unable to find the specification '
\
...
@@ -312,9 +315,7 @@ module Pod
...
@@ -312,9 +315,7 @@ module Pod
else
else
set
=
create_set_from_sources
(
dependency
)
set
=
create_set_from_sources
(
dependency
)
end
end
if
dependency
.
head?
set
=
Specification
::
Set
::
Head
.
new
(
set
.
specification
)
end
cached_sets
[
name
]
=
set
cached_sets
[
name
]
=
set
unless
set
unless
set
raise
Molinillo
::
NoSuchDependencyError
.
new
(
dependency
)
# rubocop:disable Style/RaiseArgs
raise
Molinillo
::
NoSuchDependencyError
.
new
(
dependency
)
# rubocop:disable Style/RaiseArgs
...
...
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