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.sh 1.7KB

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