summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGeorge Miller <George@livio.io>2022-08-01 12:47:58 -0400
committerGeorge Miller <George@livio.io>2022-08-01 12:47:58 -0400
commit89592207611d0aaf2967fff2d8bb006a8a072816 (patch)
treeb5c7d9a675f4d52efddc2389c234aed279737d99 /scripts
parent99a4ca37cdc9a62213bead086ee8ff574c4d3448 (diff)
downloadsdl_ios-89592207611d0aaf2967fff2d8bb006a8a072816.tar.gz
Swapped zip for tar
Zip was not reliable for creating a zip out of a .xcframework
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/create_framework.sh15
1 files changed, 7 insertions, 8 deletions
diff --git a/scripts/create_framework.sh b/scripts/create_framework.sh
index 36d851793..ed7d7ff9e 100755
--- a/scripts/create_framework.sh
+++ b/scripts/create_framework.sh
@@ -71,24 +71,23 @@ xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Pr
# TODO - is there a way we can test that the build was successful.
-folder="SmartDeviceLink.xcframework"
+framework_folder="SmartDeviceLink.xcframework"
zip_file_name="SmartDeviceLink-$new_version_number.xcframework.zip"
# Kill the old zip if present. Useful for re-running the script
if [ -f $zip_file_name ]; then rm $zip_file_name; fi
-# Verify folder exists before acting on it.
-if [ -d "$folder" ]; then
- folder=$folder"/*" # this is necessary to trick the zip command into working on the .xcframework
- zip $zip_file_name $folder
+# Verify framework_folder exists and create a zip from it.
+if [ -d "$framework_folder" ]; then
+ tar -cf $zip_file_name $framework_folder
# Check to see if the zip exists, and then remove old files.
- if [ -f "$zip_file_name" ]; then rm -r $folder; fi
+ if [ -f "$zip_file_name" ]; then rm -r $framework_folder; fi
fi
# Cleanup artifacts
folder="SmartDeviceLink-Device.xcarchive"
-if [ -d "$folder" ]; then rm -r $folder; fi
+if [ -d "$framework_folder" ]; then rm -r $framework_folder; fi
folder="SmartDeviceLink-Simulator.xcarchive"
-if [ -d "$folder" ]; then rm -r $folder; fi
+if [ -d "$framework_folder" ]; then rm -r $framework_folder; fi
echo
echo "The xcframework zip file was created at $zip_file_name." \ No newline at end of file