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.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/bin/bash
  2. set -e -u
  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/Info.plist)
  7. SDK_VERSION=${OVERRIDE_SDK_VERSION:-${DEFAULT_SDK_VERSION}}
  8. echo "Releasing Jitsi Meet SDK ${SDK_VERSION}"
  9. pushd ${RELEASE_REPO}
  10. # Generate podspec file
  11. cat JitsiMeetSDK.podspec.tpl | sed -e s/VERSION/${SDK_VERSION}/g > JitsiMeetSDK.podspec
  12. # Cleanup
  13. rm -rf Frameworks/*
  14. popd
  15. # Build the SDK
  16. pushd ${PROJECT_REPO}
  17. rm -rf ios/sdk/JitsiMeet.framework
  18. xcodebuild -workspace ios/jitsi-meet.xcworkspace -scheme JitsiMeet -destination='generic/platform=iOS' -configuration Release archive
  19. git tag ios-sdk-${SDK_VERSION}
  20. popd
  21. pushd ${RELEASE_REPO}
  22. # Put the new files in the repo
  23. cp -r ${PROJECT_REPO}/ios/sdk/JitsiMeet.framework Frameworks/
  24. cp -r ${PROJECT_REPO}/node_modules/react-native-webrtc/ios/WebRTC.framework Frameworks/
  25. # Strip bitcode
  26. xcrun bitcode_strip -r Frameworks/JitsiMeet.framework/JitsiMeet -o Frameworks/JitsiMeet.framework/JitsiMeet
  27. xcrun bitcode_strip -r Frameworks/WebRTC.framework/WebRTC -o Frameworks/WebRTC.framework/WebRTC
  28. # Add all files to git
  29. git add -A .
  30. git commit -m "${SDK_VERSION}"
  31. git tag ${SDK_VERSION}
  32. popd
  33. echo "Finished! Don't forget to push the tags and releases repo artifacts."
  34. echo "The new pod can be pushed to CocoaPods by doing: pod trunk push JitsiMeetSDK.podspec"