New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correctly process multiple xcframeworks
a pod provides.
#10884
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,8 +70,8 @@ def script | |
local destination="$2" | ||
|
||
# Use filter instead of exclude so missing patterns don't throw errors. | ||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \\"- CVS/\\" --filter \\"- .svn/\\" --filter \\"- .git/\\" --filter \\"- .hg/\\" \\"${source}\\" \\"${destination}\\"" | ||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" "${source}" "${destination}" | ||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \\"- CVS/\\" --filter \\"- .svn/\\" --filter \\"- .git/\\" --filter \\"- .hg/\\" \\"${source}*\\" \\"${destination}\\"" | ||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" "${source}"/* "${destination}" | ||
} | ||
|
||
SELECT_SLICE_RETVAL="" | ||
|
@@ -130,33 +130,6 @@ def script | |
done | ||
} | ||
|
||
install_library() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @amorde I noticed this isn't called anywhere along with the one below. are they used? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these dont seem to be used, all tests pass and examples build now without it. I think its dead code |
||
local source="$1" | ||
local name="$2" | ||
local destination="#{Target::BuildSettings::XCFRAMEWORKS_BUILD_DIR_VARIABLE}/${name}" | ||
|
||
# Libraries can contain headers, module maps, and a binary, so we'll copy everything in the folder over | ||
|
||
local source="$binary" | ||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \\"- CVS/\\" --filter \\"- .svn/\\" --filter \\"- .git/\\" --filter \\"- .hg/\\" \\"${source}/*\\" \\"${destination}\\"" | ||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" "${source}/*" "${destination}" | ||
} | ||
|
||
# Copies a framework to derived data for use in later build phases | ||
install_framework() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
{ | ||
local source="$1" | ||
local name="$2" | ||
local destination="#{Pod::Target::BuildSettings::XCFRAMEWORKS_BUILD_DIR_VARIABLE}/${name}" | ||
|
||
if [ ! -d "$destination" ]; then | ||
mkdir -p "$destination" | ||
fi | ||
|
||
copy_dir "$source" "$destination" | ||
echo "Copied $source to $destination" | ||
} | ||
|
||
install_xcframework() { | ||
local basepath="$1" | ||
local name="$2" | ||
|
@@ -179,7 +152,6 @@ def script | |
fi | ||
|
||
copy_dir "$source/" "$destination" | ||
|
||
echo "Copied $source to $destination" | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we now make
rsync
expand the file list from the directory rather than copying the directory itself. Since we use--delete
it also meant we delete other folders or files as part of this process when multiple xcframeworks are installed by a single pod.From SO:
This also preserves the
--delete
functionality that if a.framework
inside an.xcframework
has changed (due to updating the pod) that added files are included and deleted files are removed.