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
2edc117a
Commit
2edc117a
authored
Jan 04, 2016
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4722 from jedlewison/master
parents
2f9a0f8b
9286e467
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
6 deletions
+36
-6
CHANGELOG.md
CHANGELOG.md
+4
-0
xcconfig_integrator.rb
...oject_integrator/target_integrator/xcconfig_integrator.rb
+18
-6
xcconfig_integrator_spec.rb
..._integrator/target_integrator/xcconfig_integrator_spec.rb
+14
-0
No files found.
CHANGELOG.md
View file @
2edc117a
...
@@ -13,6 +13,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -13,6 +13,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Samuel Giddins
](
https://github.com/segiddins
)
[
Samuel Giddins
](
https://github.com/segiddins
)
[
#4716
](
https://github.com/CocoaPods/CocoaPods/issues/4716
)
[
#4716
](
https://github.com/CocoaPods/CocoaPods/issues/4716
)
*
Don't warn about setting base config when identical to current config.
[
Jed Lewison
](
https://github.com/jedlewison
)
[
#4722
](
https://github.com/CocoaPods/CocoaPods/issues/4722
)
## 1.0.0.beta.1 (2015-12-30)
## 1.0.0.beta.1 (2015-12-30)
...
...
lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb
View file @
2edc117a
...
@@ -88,12 +88,14 @@ module Pod
...
@@ -88,12 +88,14 @@ module Pod
if
existing
.
real_path
.
to_path
.
start_with?
(
pod_bundle
.
sandbox
.
root
.
to_path
<<
'/'
)
if
existing
.
real_path
.
to_path
.
start_with?
(
pod_bundle
.
sandbox
.
root
.
to_path
<<
'/'
)
set_base_configuration_reference
.
call
set_base_configuration_reference
.
call
elsif
!
xcconfig_includes_target_xcconfig?
(
config
.
base_configuration_reference
,
path
)
elsif
!
xcconfig_includes_target_xcconfig?
(
config
.
base_configuration_reference
,
path
)
UI
.
warn
'CocoaPods did not set the base configuration of your '
\
unless
existing_config_is_identical_to_pod_config?
(
existing
.
real_path
,
pod_bundle
.
xcconfig_path
(
config
.
name
))
'project because your project already has a custom '
\
UI
.
warn
'CocoaPods did not set the base configuration of your '
\
'config set. In order for CocoaPods integration to work at '
\
'project because your project already has a custom '
\
'all, please either set the base configurations of the target '
\
'config set. In order for CocoaPods integration to work at '
\
"`
#{
target
.
name
}
` to `
#{
path
}
` or include the `
#{
path
}
` in your "
\
'all, please either set the base configurations of the target '
\
"build configuration (
#{
UI
.
path
(
existing
.
real_path
)
}
)."
"`
#{
target
.
name
}
` to `
#{
path
}
` or include the `
#{
path
}
` in your "
\
"build configuration (
#{
UI
.
path
(
existing
.
real_path
)
}
)."
end
end
end
elsif
config
.
base_configuration_reference
.
nil?
||
file_ref
.
nil?
elsif
config
.
base_configuration_reference
.
nil?
||
file_ref
.
nil?
set_base_configuration_reference
.
call
set_base_configuration_reference
.
call
...
@@ -159,6 +161,16 @@ module Pod
...
@@ -159,6 +161,16 @@ module Pod
/x
/x
base_config_ref
.
real_path
.
readlines
.
find
{
|
line
|
line
=~
regex
}
base_config_ref
.
real_path
.
readlines
.
find
{
|
line
|
line
=~
regex
}
end
end
# Checks to see if the config files at two paths exist and are identical
#
# @param The existing config path
#
# @param The pod config path
#
def
self
.
existing_config_is_identical_to_pod_config?
(
existing_config_path
,
pod_config_path
)
existing_config_path
.
file?
&&
(
!
pod_config_path
.
file?
||
FileUtils
.
compare_file
(
existing_config_path
,
pod_config_path
))
end
end
end
end
end
end
end
...
...
spec/unit/installer/user_project_integrator/target_integrator/xcconfig_integrator_spec.rb
View file @
2edc117a
...
@@ -88,6 +88,20 @@ module Pod
...
@@ -88,6 +88,20 @@ module Pod
UI
.
warnings
.
should
.
not
.
match
/not set.*base configuration/
UI
.
warnings
.
should
.
not
.
match
/not set.*base configuration/
end
end
it
'does not log a warning if the existing xcconfig is identical to the Pods config'
do
sample_config
=
@project
.
new_file
(
'SampleConfig.xcconfig'
)
File
.
write
(
sample_config
.
real_path
,
'sample config content.'
)
@target
.
build_configurations
.
each
do
|
config
|
config
.
base_configuration_reference
=
sample_config
end
XCConfigIntegrator
.
integrate
(
@pod_bundle
,
[
@target
])
@target
.
build_configurations
.
each
do
|
config
|
config
.
base_configuration_reference
.
should
==
sample_config
end
UI
.
warnings
.
should
.
not
.
match
/not set.*base configuration/
end
it
'does not log a warning if the user has set a xcconfig of their own that includes the silence warnings string'
do
it
'does not log a warning if the user has set a xcconfig of their own that includes the silence warnings string'
do
SILENCE_TOKEN
=
'// @COCOAPODS_SILENCE_WARNINGS@ //'
SILENCE_TOKEN
=
'// @COCOAPODS_SILENCE_WARNINGS@ //'
sample_config
=
@project
.
new_file
(
'SampleConfig.xcconfig'
)
sample_config
=
@project
.
new_file
(
'SampleConfig.xcconfig'
)
...
...
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