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.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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/out
  19. xcodebuild clean \
  20. -workspace ios/jitsi-meet.xcworkspace \
  21. -scheme JitsiMeetSDK
  22. xcodebuild archive \
  23. -workspace ios/jitsi-meet.xcworkspace \
  24. -scheme JitsiMeetSDK \
  25. -configuration Release \
  26. -sdk iphonesimulator \
  27. -destination='generic/platform=iOS Simulator' \
  28. -archivePath ios/sdk/out/ios-simulator \
  29. SKIP_INSTALL=NO \
  30. BUILD_LIBRARY_FOR_DISTRIBUTION=YES
  31. xcodebuild archive \
  32. -workspace ios/jitsi-meet.xcworkspace \
  33. -scheme JitsiMeetSDK \
  34. -configuration Release \
  35. -sdk iphoneos \
  36. -destination='generic/platform=iOS' \
  37. -archivePath ios/sdk/out/ios-device \
  38. SKIP_INSTALL=NO \
  39. BUILD_LIBRARY_FOR_DISTRIBUTION=YES
  40. xcodebuild -create-xcframework \
  41. -framework ios/sdk/out/ios-device.xcarchive/Products/Library/Frameworks/JitsiMeetSDK.framework \
  42. -framework ios/sdk/out/ios-simulator.xcarchive/Products/Library/Frameworks/JitsiMeetSDK.framework \
  43. -output ios/sdk/out/JitsiMeetSDK.xcframework
  44. if [[ $DO_GIT_TAG == 1 ]]; then
  45. git tag ios-sdk-${SDK_VERSION}
  46. fi
  47. popd
  48. pushd ${RELEASE_REPO}
  49. # Put the new files in the repo
  50. cp -a ${PROJECT_REPO}/ios/sdk/out/JitsiMeetSDK.xcframework Frameworks/
  51. # Add all files to git
  52. if [[ $DO_GIT_TAG == 1 ]]; then
  53. git add -A .
  54. git commit -m "${SDK_VERSION}"
  55. git tag ${SDK_VERSION}
  56. fi
  57. popd
  58. echo "Finished! Don't forget to push the tags and releases repo artifacts."
  59. echo "The new pod can be pushed to CocoaPods by doing: pod trunk push JitsiMeetSDK.podspec"