[ios] Bring in upstream changes to strip-frameworks script
Upstream commits: realm/realm-cocoa@cb8e3b6 and realm/realm-cocoa@453e0c1
This commit is contained in:
@@ -35,9 +35,19 @@ code_sign() {
|
||||
/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1"
|
||||
}
|
||||
|
||||
echo "Stripping frameworks"
|
||||
# Set working directory to product’s embedded frameworks
|
||||
cd "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}"
|
||||
|
||||
if [ "$ACTION" = "install" ]; then
|
||||
echo "Copy .bcsymbolmap files to .xcarchive"
|
||||
find . -name '*.bcsymbolmap' -type f -exec mv {} "${CONFIGURATION_BUILD_DIR}" \;
|
||||
else
|
||||
# Delete *.bcsymbolmap files from framework bundle unless archiving
|
||||
find . -name '*.bcsymbolmap' -type f -exec rm -rf "{}" +\;
|
||||
fi
|
||||
|
||||
echo "Stripping frameworks"
|
||||
|
||||
for file in $(find . -type f -perm +111); do
|
||||
# Skip non-dynamic libraries
|
||||
if ! [[ "$(file "$file")" == *"dynamically linked shared library"* ]]; then
|
||||
@@ -61,14 +71,6 @@ for file in $(find . -type f -perm +111); do
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$ACTION" = "install" ]; then
|
||||
echo "Copy .bcsymbolmap files to .xcarchive"
|
||||
find . -name '*.bcsymbolmap' -type f -exec mv {} "${CONFIGURATION_BUILD_DIR}" \;
|
||||
else
|
||||
# Delete *.bcsymbolmap files from framework bundle unless archiving
|
||||
find . -name '*.bcsymbolmap' -type f -exec rm -rf "{}" +\;
|
||||
fi
|
||||
|
||||
# When this script finishes executing, delete itself from the built product
|
||||
function finish {
|
||||
if [[ $0 == "${BUILT_PRODUCTS_DIR}"* ]]; then
|
||||
|
||||
Reference in New Issue
Block a user