-
Notifications
You must be signed in to change notification settings - Fork 19
/
bump.sh
executable file
·23 lines (18 loc) · 1.01 KB
/
bump.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
read -p "Enter version number: " VERSION
sed -i '' "s/let version = \".*\"/let version = \"$VERSION\"/" Package.swift
RUN_PATH=$(pwd)
cd $RUN_PATH/bin
rm -f $RUN_PATH/build/Mediasoup.xcframework.zip
zip -r $RUN_PATH/build/Mediasoup.xcframework.zip Mediasoup.xcframework -x "*.DS_Store"
rm -f $RUN_PATH/build/WebRTC.xcframework.zip
zip -r $RUN_PATH/build/WebRTC.xcframework.zip WebRTC.xcframework -x "*.DS_Store"
cd $RUN_PATH
MEDIASOUP_CHECKSUM=$(swift package compute-checksum ./build/Mediasoup.xcframework.zip)
WEBRTC_CHECKSUM=$(swift package compute-checksum ./build/WebRTC.xcframework.zip)
sed -i '' "s/let mediasoupChecksum = \".*\"/let mediasoupChecksum = \"$MEDIASOUP_CHECKSUM\"/" Package.swift
sed -i '' "s/let webrtcChecksum = \".*\"/let webrtcChecksum = \"$WEBRTC_CHECKSUM\"/" Package.swift
sed -i '' "s/spec.version = \".*\"/spec.version = \"$VERSION\"/" Mediasoup-Client-Swift.podspec
sed -i '' "s/pod 'Mediasoup-Client-Swift', '.*'/pod 'Mediasoup-Client-Swift', '$VERSION'/" README.md
cd Example
pod install