You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

release-sdk-lite.sh 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/bin/bash
  2. set -e -u -x
  3. THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)
  4. PROJECT_REPO=$(realpath ${THIS_DIR}/../..)
  5. RELEASE_REPO=$(realpath ${THIS_DIR}/../../../jitsi-meet-ios-sdk-releases)
  6. DEFAULT_SDK_VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" ${THIS_DIR}/../sdk/src/Lite-Info.plist)
  7. SDK_VERSION=${OVERRIDE_SDK_VERSION:-${DEFAULT_SDK_VERSION}}
  8. echo "Releasing Jitsi Meet SDK Lite ${SDK_VERSION}"
  9. pushd ${RELEASE_REPO}
  10. # Generate podspec file
  11. cat JitsiMeetSDKLite.podspec.tpl | sed -e s/VERSION/${SDK_VERSION}-lite/g > JitsiMeetSDKLite.podspec
  12. # Cleanup
  13. rm -rf lite/Frameworks/*
  14. popd
  15. # Build the SDK
  16. pushd ${PROJECT_REPO}
  17. rm -rf ios/sdk/out
  18. xcodebuild clean \
  19. -workspace ios/jitsi-meet.xcworkspace \
  20. -scheme JitsiMeetSDKLite
  21. xcodebuild archive \
  22. -workspace ios/jitsi-meet.xcworkspace \
  23. -scheme JitsiMeetSDKLite \
  24. -configuration Release \
  25. -sdk iphonesimulator \
  26. -destination='generic/platform=iOS Simulator' \
  27. -archivePath ios/sdk/out/ios-simulator \
  28. SKIP_INSTALL=NO \
  29. BUILD_LIBRARY_FOR_DISTRIBUTION=YES
  30. xcodebuild archive \
  31. -workspace ios/jitsi-meet.xcworkspace \
  32. -scheme JitsiMeetSDKLite \
  33. -configuration Release \
  34. -sdk iphoneos \
  35. -destination='generic/platform=iOS' \
  36. -archivePath ios/sdk/out/ios-device \
  37. SKIP_INSTALL=NO \
  38. BUILD_LIBRARY_FOR_DISTRIBUTION=YES
  39. xcodebuild -create-xcframework \
  40. -framework ios/sdk/out/ios-device.xcarchive/Products/Library/Frameworks/JitsiMeetSDK.framework \
  41. -framework ios/sdk/out/ios-simulator.xcarchive/Products/Library/Frameworks/JitsiMeetSDK.framework \
  42. -output ios/sdk/out/JitsiMeetSDK.xcframework
  43. popd
  44. pushd ${RELEASE_REPO}
  45. # Put the new files in the repo
  46. cp -a ${PROJECT_REPO}/ios/sdk/out/JitsiMeetSDK.xcframework lite/Frameworks/
  47. cp -a ${PROJECT_REPO}/ios/sdk/out/hermes.xcframework lite/Frameworks/
  48. # Add all files to git
  49. git add -A .
  50. git commit --allow-empty -m "${SDK_VERSION} lite"
  51. git tag "${SDK_VERSION}-lite"
  52. popd
  53. echo "Finished! Don't forget to push the tags and releases repo artifacts."
  54. echo "The new pod can be pushed to CocoaPods by doing: pod trunk push JitsiMeetSDKLite.podspec"