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

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. # Add all files to git
  26. git add -A .
  27. git commit -m "${SDK_VERSION}"
  28. git tag ${SDK_VERSION}
  29. popd
  30. echo "Finished! Don't forget to push the tags and releases repo artifacts."
  31. echo "The new pod can be pushed to CocoaPods by doing: pod trunk push JitsiMeetSDK.podspec"