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

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. SDK_VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" ${THIS_DIR}/../sdk/src/Info.plist)
  7. echo "Releasing Jitsi Meet SDK ${SDK_VERSION}"
  8. pushd ${RELEASE_REPO}
  9. # Generate podspec file
  10. cat JitsiMeetSDK.podspec.tpl | sed -e s/VERSION/${SDK_VERSION}/g > JitsiMeetSDK.podspec
  11. # Cleanup
  12. rm -rf Frameworks/*
  13. popd
  14. # Build the SDK
  15. pushd ${PROJECT_REPO}
  16. rm -rf ios/sdk/JitsiMeet.framework
  17. xcodebuild -workspace ios/jitsi-meet.xcworkspace -scheme JitsiMeet -destination='generic/platform=iOS' -configuration Release archive
  18. git tag -a ios-sdk-${SDK_VERSION}
  19. popd
  20. pushd ${RELEASE_REPO}
  21. # Put the new files in the repo
  22. cp -r ${PROJECT_REPO}/ios/sdk/JitsiMeet.framework Frameworks/
  23. cp -r ${PROJECT_REPO}/node_modules/react-native-webrtc/ios/WebRTC.framework Frameworks/
  24. # Add all files to git
  25. git add -A .
  26. git commit -m "${SDK_VERSION}"
  27. git tag ${SDK_VERSION}
  28. popd
  29. echo "Finished! Don't forget to push the tags and releases repo artifacts."
  30. echo "The new pod can be pushed to CocoaPods by doing: pod trunk push JitsiMeetSDK.podspec"