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
866e9e39
Commit
866e9e39
authored
Feb 07, 2015
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'flufff42-install-resources-script-expansion'
parents
0505ce41
0b702445
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
3 deletions
+18
-3
CHANGELOG.md
CHANGELOG.md
+4
-0
copy_resources_script.rb
lib/cocoapods/generator/copy_resources_script.rb
+1
-1
aggregate_target_installer.rb
.../installer/target_installer/aggregate_target_installer.rb
+1
-1
copy_resources_script_spec.rb
spec/unit/generator/copy_resources_script_spec.rb
+12
-1
No files found.
CHANGELOG.md
View file @
866e9e39
...
...
@@ -20,6 +20,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Boris Bügling
](
https://github.com/neonichu
)
[
#3102
](
https://github.com/CocoaPods/CocoaPods/issues/3102
)
*
Correct escaping of resource bundles in 'Copy Pods Resources' script.
[
Seán Labastille
](
https://github.com/flufff42
)
[
#3082
](
https://github.com/CocoaPods/CocoaPods/issues/3082
)
## 0.36.0.beta.2
...
...
lib/cocoapods/generator/copy_resources_script.rb
View file @
866e9e39
...
...
@@ -76,7 +76,7 @@ module Pod
unless
resources
.
empty?
script
+=
%(if [[ "$CONFIGURATION" == "#{config}" ]]; then\n)
resources
.
each
do
|
resource
|
script
+=
" install_resource '
#{
resource
}
'
\n
"
script
+=
%( install_resource "#{resource}"\n)
end
script
+=
"fi
\n
"
end
...
...
lib/cocoapods/installer/target_installer/aggregate_target_installer.rb
View file @
866e9e39
...
...
@@ -118,7 +118,7 @@ module Pod
target
.
user_build_configurations
.
keys
.
each
do
|
config
|
file_accessors
=
library_targets
.
select
{
|
t
|
t
.
include_in_build_config?
(
config
)
}.
flat_map
(
&
:file_accessors
)
resource_paths
=
file_accessors
.
flat_map
{
|
accessor
|
accessor
.
resources
.
flat_map
{
|
res
|
res
.
relative_path_from
(
project
.
path
.
dirname
)
}
}
resource_bundles
=
file_accessors
.
flat_map
{
|
accessor
|
accessor
.
resource_bundles
.
keys
.
map
{
|
name
|
"${BUILT_PRODUCTS_DIR}/
#{
name
}
.bundle"
}
}
resource_bundles
=
file_accessors
.
flat_map
{
|
accessor
|
accessor
.
resource_bundles
.
keys
.
map
{
|
name
|
"${BUILT_PRODUCTS_DIR}/
#{
name
.
shellescape
}
.bundle"
}
}
resources_by_config
[
config
]
=
resource_paths
+
resource_bundles
resources_by_config
[
config
]
<<
bridge_support_file
if
bridge_support_file
end
...
...
spec/unit/generator/copy_resources_script_spec.rb
View file @
866e9e39
...
...
@@ -24,7 +24,18 @@ module Pod
script
=
generator
.
send
(
:script
)
script
.
should
.
include
<<-
eos
.
strip_heredoc
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_resource 'Lookout.framework'
install_resource "Lookout.framework"
fi
eos
end
it
'adds resource bundles with a call wrapped in an if statement'
do
resources
=
{
'Debug'
=>
%w(${BUILT_PRODUCTS_DIR}/Resources.bundle)
}
generator
=
Pod
::
Generator
::
CopyResourcesScript
.
new
(
resources
,
Platform
.
new
(
:ios
,
'6.0'
))
script
=
generator
.
send
(
:script
)
script
.
should
.
include
<<-
eos
.
strip_heredoc
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_resource "${BUILT_PRODUCTS_DIR}/Resources.bundle"
fi
eos
end
...
...
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