"Fossies" - the Fresh Open Source Software Archive

Member "jitsi-meet-5079/ios/scripts/release-sdk.sh" (17 Jun 2021, 2398 Bytes) of package /linux/misc/jitsi-meet-5079.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 pushd ${RELEASE_REPO}
   16 
   17 # Generate podspec file
   18 cat JitsiMeetSDK.podspec.tpl | sed -e s/VERSION/${SDK_VERSION}/g > JitsiMeetSDK.podspec
   19 
   20 # Cleanup
   21 rm -rf Frameworks/*
   22 
   23 popd
   24 
   25 # Build the SDK
   26 pushd ${PROJECT_REPO}
   27 rm -rf ios/sdk/out
   28 xcodebuild clean \
   29     -workspace ios/jitsi-meet.xcworkspace \
   30     -scheme JitsiMeetSDK
   31 xcodebuild archive \
   32     -workspace ios/jitsi-meet.xcworkspace \
   33     -scheme JitsiMeetSDK  \
   34     -configuration Release \
   35     -sdk iphonesimulator \
   36     -destination='generic/platform=iOS Simulator' \
   37     -archivePath ios/sdk/out/ios-simulator \
   38     VALID_ARCHS=x86_64 \
   39     ENABLE_BITCODE=NO \
   40     SKIP_INSTALL=NO \
   41     BUILD_LIBRARY_FOR_DISTRIBUTION=YES
   42 xcodebuild archive \
   43     -workspace ios/jitsi-meet.xcworkspace \
   44     -scheme JitsiMeetSDK  \
   45     -configuration Release \
   46     -sdk iphoneos \
   47     -destination='generic/platform=iOS' \
   48     -archivePath ios/sdk/out/ios-device \
   49     VALID_ARCHS=arm64 \
   50     ENABLE_BITCODE=NO \
   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 cp -a ${PROJECT_REPO}/node_modules/react-native-webrtc/apple/WebRTC.xcframework Frameworks/
   67 
   68 # Add all files to git
   69 if [[ $DO_GIT_TAG == 1 ]]; then
   70     git add -A .
   71     git commit -m "${SDK_VERSION}"
   72     git tag ${SDK_VERSION}
   73 fi
   74 
   75 popd
   76 
   77 echo "Finished! Don't forget to push the tags and releases repo artifacts."
   78 echo "The new pod can be pushed to CocoaPods by doing: pod trunk push JitsiMeetSDK.podspec"