選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

release-sdk.sh 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. ENABLE_BITCODE=NO \
  30. SKIP_INSTALL=NO \
  31. BUILD_LIBRARY_FOR_DISTRIBUTION=YES
  32. xcodebuild archive \
  33. -workspace ios/jitsi-meet.xcworkspace \
  34. -scheme JitsiMeetSDK \
  35. -configuration Release \
  36. -sdk iphoneos \
  37. -destination='generic/platform=iOS' \
  38. -archivePath ios/sdk/out/ios-device \
  39. ENABLE_BITCODE=NO \
  40. SKIP_INSTALL=NO \
  41. BUILD_LIBRARY_FOR_DISTRIBUTION=YES
  42. xcodebuild -create-xcframework \
  43. -framework ios/sdk/out/ios-device.xcarchive/Products/Library/Frameworks/JitsiMeetSDK.framework \
  44. -framework ios/sdk/out/ios-simulator.xcarchive/Products/Library/Frameworks/JitsiMeetSDK.framework \
  45. -output ios/sdk/out/JitsiMeetSDK.xcframework
  46. if [[ $DO_GIT_TAG == 1 ]]; then
  47. git tag ios-sdk-${SDK_VERSION}
  48. fi
  49. popd
  50. pushd ${RELEASE_REPO}
  51. # Put the new files in the repo
  52. cp -a ${PROJECT_REPO}/ios/sdk/out/JitsiMeetSDK.xcframework Frameworks/
  53. cp -a ${PROJECT_REPO}/node_modules/react-native-webrtc/apple/WebRTC.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"