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
90992542
Commit
90992542
authored
Feb 11, 2017
by
Dimitris Koutsogiorgas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Target integrator now uses relative path to Podfile for build phase script
parent
015108ee
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
40 additions
and
3 deletions
+40
-3
CHANGELOG.md
CHANGELOG.md
+4
-0
aggregate_xcconfig.rb
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
+1
-0
target_integrator.rb
...ds/installer/user_project_integrator/target_integrator.rb
+1
-1
aggregate_target.rb
lib/cocoapods/target/aggregate_target.rb
+10
-0
cocoapods-integration-specs
spec/cocoapods-integration-specs
+1
-1
aggregate_xcconfig_spec.rb
spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
+22
-0
target_integrator_spec.rb
...staller/user_project_integrator/target_integrator_spec.rb
+1
-1
No files found.
CHANGELOG.md
View file @
90992542
...
@@ -19,6 +19,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -19,6 +19,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#6481
](
https://github.com/CocoaPods/CocoaPods/pull/6481
)
[
#6481
](
https://github.com/CocoaPods/CocoaPods/pull/6481
)
*
Uses
`${PODS_PODFILE_DIR_PATH}`
for generated manifest lock script phase.
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#5499
](
https://github.com/CocoaPods/CocoaPods/issues/5499
)
*
Do not generate
`UIRequiredDeviceCapabilities`
for
`tvOS`
Info.plists.
*
Do not generate
`UIRequiredDeviceCapabilities`
for
`tvOS`
Info.plists.
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#6193
](
https://github.com/CocoaPods/CocoaPods/issues/6193
)
[
#6193
](
https://github.com/CocoaPods/CocoaPods/issues/6193
)
...
...
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
View file @
90992542
...
@@ -56,6 +56,7 @@ module Pod
...
@@ -56,6 +56,7 @@ module Pod
includes_static_libs
||=
pod_targets
.
flat_map
(
&
:file_accessors
).
any?
{
|
fa
|
!
fa
.
vendored_static_artifacts
.
empty?
}
includes_static_libs
||=
pod_targets
.
flat_map
(
&
:file_accessors
).
any?
{
|
fa
|
!
fa
.
vendored_static_artifacts
.
empty?
}
config
=
{
config
=
{
'OTHER_LDFLAGS'
=>
'$(inherited) '
+
XCConfigHelper
.
default_ld_flags
(
target
,
includes_static_libs
),
'OTHER_LDFLAGS'
=>
'$(inherited) '
+
XCConfigHelper
.
default_ld_flags
(
target
,
includes_static_libs
),
'PODS_PODFILE_DIR_PATH'
=>
target
.
podfile_dir_relative_path
,
'PODS_ROOT'
=>
target
.
relative_pods_root
,
'PODS_ROOT'
=>
target
.
relative_pods_root
,
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
,
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
,
'FRAMEWORK_SEARCH_PATHS'
=>
'$(inherited) '
,
'FRAMEWORK_SEARCH_PATHS'
=>
'$(inherited) '
,
...
...
lib/cocoapods/installer/user_project_integrator/target_integrator.rb
View file @
90992542
...
@@ -177,7 +177,7 @@ module Pod
...
@@ -177,7 +177,7 @@ module Pod
phase
=
create_or_update_build_phase
(
native_target
,
phase_name
)
phase
=
create_or_update_build_phase
(
native_target
,
phase_name
)
native_target
.
build_phases
.
unshift
(
phase
).
uniq!
unless
native_target
.
build_phases
.
first
==
phase
native_target
.
build_phases
.
unshift
(
phase
).
uniq!
unless
native_target
.
build_phases
.
first
==
phase
phase
.
shell_script
=
<<-
SH
.
strip_heredoc
phase
.
shell_script
=
<<-
SH
.
strip_heredoc
diff "${
SRCROOT
}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
diff "${
PODS_PODFILE_DIR_PATH
}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
if [ $? != 0 ] ; then
if [ $? != 0 ] ; then
# print error to STDERR
# print error to STDERR
echo "error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation." >&2
echo "error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation." >&2
...
...
lib/cocoapods/target/aggregate_target.rb
View file @
90992542
...
@@ -204,6 +204,16 @@ module Pod
...
@@ -204,6 +204,16 @@ module Pod
"${SRCROOT}/
#{
sandbox
.
root
.
relative_path_from
(
client_root
)
}
"
"${SRCROOT}/
#{
sandbox
.
root
.
relative_path_from
(
client_root
)
}
"
end
end
# @return [String] The path of the Podfile directory relative to the
# root of the user project.
#
def
podfile_dir_relative_path
podfile_path
=
target_definition
.
podfile
.
defined_in_file
return
"${SRCROOT}/
#{
podfile_path
.
relative_path_from
(
client_root
).
dirname
}
"
unless
podfile_path
.
nil?
# Fallback to the standard path if the Podfile is not represented by a file.
'${PODS_ROOT}/..'
end
# @param [String] config_name The build configuration name to get the xcconfig for
# @param [String] config_name The build configuration name to get the xcconfig for
# @return [String] The path of the xcconfig file relative to the root of
# @return [String] The path of the xcconfig file relative to the root of
# the user project.
# the user project.
...
...
cocoapods-integration-specs
@
e62f3157
Subproject commit
d6b41d09e7a076f2f0078bce2f7cb1af9a7724a
0
Subproject commit
e62f3157268e9d2fe634dfab2560c89013d8924
0
spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
View file @
90992542
...
@@ -30,6 +30,28 @@ module Pod
...
@@ -30,6 +30,28 @@ module Pod
@generator
.
target
.
relative_pods_root
.
should
==
'${SRCROOT}/Pods'
@generator
.
target
.
relative_pods_root
.
should
==
'${SRCROOT}/Pods'
end
end
it
'returns the path of the podfile directory relative to the standard user project'
do
podfile
=
@target
.
target_definition
.
podfile
podfile
.
stubs
(
:defined_in_file
).
returns
(
Pathname
.
new
(
@target
.
client_root
)
+
'Podfile'
)
@target
.
target_definition
.
stubs
(
:podfile
).
returns
(
podfile
)
@generator
.
target
.
podfile_dir_relative_path
.
should
==
'${SRCROOT}/.'
end
it
'returns the path of the podfile directory relative to a nested user project'
do
podfile
=
@target
.
target_definition
.
podfile
podfile
.
stubs
(
:defined_in_file
).
returns
(
Pathname
.
new
(
@target
.
client_root
)
+
'Podfile'
)
@target
.
target_definition
.
stubs
(
:podfile
).
returns
(
podfile
)
@target
.
client_root
=
Pathname
.
new
(
@target
.
client_root
)
+
'NestedFolder'
@generator
.
target
.
podfile_dir_relative_path
.
should
==
'${SRCROOT}/..'
end
it
'returns the standard path if the podfile is not defined in file'
do
podfile
=
@target
.
target_definition
.
podfile
podfile
.
stubs
(
:defined_in_file
).
returns
(
nil
)
@target
.
target_definition
.
stubs
(
:podfile
).
returns
(
podfile
)
@generator
.
target
.
podfile_dir_relative_path
.
should
==
'${PODS_ROOT}/..'
end
#--------------------------------------------------------------------#
#--------------------------------------------------------------------#
before
do
before
do
...
...
spec/unit/installer/user_project_integrator/target_integrator_spec.rb
View file @
90992542
...
@@ -95,7 +95,7 @@ module Pod
...
@@ -95,7 +95,7 @@ module Pod
phase_name
=
@phase_prefix
+
Installer
::
UserProjectIntegrator
::
TargetIntegrator
::
CHECK_MANIFEST_PHASE_NAME
phase_name
=
@phase_prefix
+
Installer
::
UserProjectIntegrator
::
TargetIntegrator
::
CHECK_MANIFEST_PHASE_NAME
phase
=
target
.
shell_script_build_phases
.
find
{
|
bp
|
bp
.
name
==
phase_name
}
phase
=
target
.
shell_script_build_phases
.
find
{
|
bp
|
bp
.
name
==
phase_name
}
phase
.
shell_script
.
should
==
<<-
EOS
.
strip_heredoc
phase
.
shell_script
.
should
==
<<-
EOS
.
strip_heredoc
diff "${
SRCROOT
}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
diff "${
PODS_PODFILE_DIR_PATH
}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
if [ $? != 0 ] ; then
if [ $? != 0 ] ; then
# print error to STDERR
# print error to STDERR
echo "error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation." >&2
echo "error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation." >&2
...
...
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