Skip to content

Commit a60a69d

Browse files
committed
fix copying dsym
1 parent 8eae79f commit a60a69d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/cocoapods-binary/Integration.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def mirror_with_symlink(source, basefolder, target_folder)
5555
walk(real_file_folder) do |child|
5656
source = child
5757
# only make symlink to file and `.framework` folder
58-
if child.directory? and child.extname == ".framework"
58+
if child.directory? and [".framework", ".dSYM"].include? child.extname
5959
mirror_with_symlink(source, real_file_folder, target_folder)
6060
next false # return false means don't go deeper
6161
elsif child.file?
@@ -243,8 +243,9 @@ class EmbedFrameworksScript
243243
# ---- this is added by cocoapods-binary ---
244244
# Readlink cannot handle relative symlink well, so we override it to a new one
245245
# If the path isn't an absolute path, we add a realtive prefix.
246+
old_read_link=`which readlink`
246247
readlink () {
247-
path=`/usr/bin/readlink $1`;
248+
path=`$old_read_link $1`;
248249
if [ $(echo "$path" | cut -c 1-1) = '/' ]; then
249250
echo $path;
250251
else
@@ -253,6 +254,10 @@ class EmbedFrameworksScript
253254
}
254255
# ---
255256
SH
257+
258+
# patch the rsync for copy dSYM symlink
259+
script = script.gsub "rsync --delete", "rsync --copy-links --delete"
260+
256261
patch + script
257262
end
258263
end

0 commit comments

Comments
 (0)