Browse Source

ios: add SDK release script

master
Saúl Ibarra Corretgé 6 years ago
parent
commit
f73d3a4063
1 changed files with 44 additions and 0 deletions
  1. 44
    0
      ios/scripts/release-sdk.sh

+ 44
- 0
ios/scripts/release-sdk.sh View File

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

Loading…
Cancel
Save