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 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. ${THIS_DIR}/../../node_modules/react-native-webrtc/tools/downloadBitcode.sh
  11. pushd ${RELEASE_REPO}
  12. # Generate podspec file
  13. cat JitsiMeetSDK.podspec.tpl | sed -e s/VERSION/${SDK_VERSION}/g > JitsiMeetSDK.podspec
  14. # Cleanup
  15. rm -rf Frameworks/*
  16. popd
  17. # Build the SDK
  18. pushd ${PROJECT_REPO}
  19. rm -rf ios/sdk/out
  20. xcodebuild clean \
  21. -workspace ios/jitsi-meet.xcworkspace \
  22. -scheme JitsiMeetSDK
  23. xcodebuild archive \
  24. -workspace ios/jitsi-meet.xcworkspace \
  25. -scheme JitsiMeetSDK \
  26. -configuration Release \
  27. -sdk iphonesimulator \
  28. -destination='generic/platform=iOS Simulator' \
  29. -archivePath ios/sdk/out/ios-simulator \
  30. ENABLE_BITCODE=YES \
  31. SKIP_INSTALL=NO \
  32. BUILD_LIBRARY_FOR_DISTRIBUTION=YES
  33. xcodebuild archive \
  34. -workspace ios/jitsi-meet.xcworkspace \
  35. -scheme JitsiMeetSDK \
  36. -configuration Release \
  37. -sdk iphoneos \
  38. -destination='generic/platform=iOS' \
  39. -archivePath ios/sdk/out/ios-device \
  40. ENABLE_BITCODE=YES \
  41. SKIP_INSTALL=NO \
  42. BUILD_LIBRARY_FOR_DISTRIBUTION=YES
  43. xcodebuild -create-xcframework \
  44. -framework ios/sdk/out/ios-device.xcarchive/Products/Library/Frameworks/JitsiMeetSDK.framework \
  45. -framework ios/sdk/out/ios-simulator.xcarchive/Products/Library/Frameworks/JitsiMeetSDK.framework \
  46. -output ios/sdk/out/JitsiMeetSDK.xcframework
  47. if [[ $DO_GIT_TAG == 1 ]]; then
  48. git tag ios-sdk-${SDK_VERSION}
  49. fi
  50. popd
  51. pushd ${RELEASE_REPO}
  52. # Put the new files in the repo
  53. cp -a ${PROJECT_REPO}/ios/sdk/out/JitsiMeetSDK.xcframework Frameworks/
  54. # Add all files to git
  55. if [[ $DO_GIT_TAG == 1 ]]; then
  56. git add -A .
  57. git commit -m "${SDK_VERSION}"
  58. git tag ${SDK_VERSION}
  59. fi
  60. popd
  61. echo "Finished! Don't forget to push the tags and releases repo artifacts."
  62. echo "The new pod can be pushed to CocoaPods by doing: pod trunk push JitsiMeetSDK.podspec"