"Fossies" - the Fresh Open Source Software Archive

Member "jitsi-meet-6316/ios/scripts/release-sdk.sh" (5 Jul 2022, 2336 Bytes) of package /linux/misc/jitsi-meet-6316.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/bash
    2 
    3 set -e -u
    4 
    5 THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)
    6 PROJECT_REPO=$(realpath ${THIS_DIR}/../..)
    7 RELEASE_REPO=$(realpath ${THIS_DIR}/../../../jitsi-meet-ios-sdk-releases)
    8 DEFAULT_SDK_VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" ${THIS_DIR}/../sdk/src/Info.plist)
    9 SDK_VERSION=${OVERRIDE_SDK_VERSION:-${DEFAULT_SDK_VERSION}}
   10 DO_GIT_TAG=${GIT_TAG:-0}
   11 
   12 
   13 echo "Releasing Jitsi Meet SDK ${SDK_VERSION}"
   14 
   15 ${THIS_DIR}/../../node_modules/react-native-webrtc/tools/downloadBitcode.sh
   16 
   17 pushd ${RELEASE_REPO}
   18 
   19 # Generate podspec file
   20 cat JitsiMeetSDK.podspec.tpl | sed -e s/VERSION/${SDK_VERSION}/g > JitsiMeetSDK.podspec
   21 
   22 # Cleanup
   23 rm -rf Frameworks/*
   24 
   25 popd
   26 
   27 # Build the SDK
   28 pushd ${PROJECT_REPO}
   29 rm -rf ios/sdk/out
   30 xcodebuild clean \
   31     -workspace ios/jitsi-meet.xcworkspace \
   32     -scheme JitsiMeetSDK
   33 xcodebuild archive \
   34     -workspace ios/jitsi-meet.xcworkspace \
   35     -scheme JitsiMeetSDK  \
   36     -configuration Release \
   37     -sdk iphonesimulator \
   38     -destination='generic/platform=iOS Simulator' \
   39     -archivePath ios/sdk/out/ios-simulator \
   40     ENABLE_BITCODE=YES \
   41     SKIP_INSTALL=NO \
   42     BUILD_LIBRARY_FOR_DISTRIBUTION=YES
   43 xcodebuild archive \
   44     -workspace ios/jitsi-meet.xcworkspace \
   45     -scheme JitsiMeetSDK  \
   46     -configuration Release \
   47     -sdk iphoneos \
   48     -destination='generic/platform=iOS' \
   49     -archivePath ios/sdk/out/ios-device \
   50     ENABLE_BITCODE=YES \
   51     SKIP_INSTALL=NO \
   52     BUILD_LIBRARY_FOR_DISTRIBUTION=YES
   53 xcodebuild -create-xcframework \
   54     -framework ios/sdk/out/ios-device.xcarchive/Products/Library/Frameworks/JitsiMeetSDK.framework \
   55     -framework ios/sdk/out/ios-simulator.xcarchive/Products/Library/Frameworks/JitsiMeetSDK.framework \
   56     -output ios/sdk/out/JitsiMeetSDK.xcframework
   57 if [[ $DO_GIT_TAG == 1 ]]; then
   58     git tag ios-sdk-${SDK_VERSION}
   59 fi
   60 popd
   61 
   62 pushd ${RELEASE_REPO}
   63 
   64 # Put the new files in the repo
   65 cp -a ${PROJECT_REPO}/ios/sdk/out/JitsiMeetSDK.xcframework Frameworks/
   66 
   67 # Add all files to git
   68 if [[ $DO_GIT_TAG == 1 ]]; then
   69     git add -A .
   70     git commit -m "${SDK_VERSION}"
   71     git tag ${SDK_VERSION}
   72 fi
   73 
   74 popd
   75 
   76 echo "Finished! Don't forget to push the tags and releases repo artifacts."
   77 echo "The new pod can be pushed to CocoaPods by doing: pod trunk push JitsiMeetSDK.podspec"