浏览代码

android: update SDK release script to publish JSC artifacts

In
b53a034aaf (diff-0339cf92cc68bc5981fe6df601316c1c)
I removed this, because RN has updated the builtin JSC version. On the next
release, however, RN introduced a new JS interpreter (Hermes) so JSC is now a RN
dependency. Thus, add the magic spells to publish the AARs to Maven.
master
Saúl Ibarra Corretgé 6 年前
父节点
当前提交
6861f463b3
共有 1 个文件被更改,包括 34 次插入7 次删除
  1. 34
    7
      android/scripts/release-sdk.sh

+ 34
- 7
android/scripts/release-sdk.sh 查看文件

10
 DEFAULT_SDK_VERSION=$(grep sdkVersion ${THIS_DIR}/../gradle.properties | cut -d"=" -f2)
10
 DEFAULT_SDK_VERSION=$(grep sdkVersion ${THIS_DIR}/../gradle.properties | cut -d"=" -f2)
11
 SDK_VERSION=${OVERRIDE_SDK_VERSION:-${DEFAULT_SDK_VERSION}}
11
 SDK_VERSION=${OVERRIDE_SDK_VERSION:-${DEFAULT_SDK_VERSION}}
12
 RN_VERSION=$(jq -r '.dependencies."react-native"' ${THIS_DIR}/../../package.json)
12
 RN_VERSION=$(jq -r '.dependencies."react-native"' ${THIS_DIR}/../../package.json)
13
+JSC_VERSION="r"$(jq -r '.dependencies."jsc-android"' ${THIS_DIR}/../../node_modules/react-native/package.json | cut -d . -f 1)
13
 DO_GIT_TAG=${GIT_TAG:-0}
14
 DO_GIT_TAG=${GIT_TAG:-0}
14
 
15
 
15
 if [[ $THE_MVN_REPO == http* ]]; then
16
 if [[ $THE_MVN_REPO == http* ]]; then
37
         -DgeneratePom=false \
38
         -DgeneratePom=false \
38
         -DpomFile=react-native-${RN_VERSION}.pom || true
39
         -DpomFile=react-native-${RN_VERSION}.pom || true
39
     popd
40
     popd
41
+    # Push JSC
42
+    echo "Pushing JSC ${JSC_VERSION} to the Maven repo"
43
+    pushd ${THIS_DIR}/../../node_modules/jsc-android/dist/org/webkit/android-jsc/${JSC_VERSION}
44
+    mvn \
45
+        deploy:deploy-file \
46
+        -Durl=${MVN_REPO} \
47
+        -DrepositoryId=${MVN_REPO_ID} \
48
+        -Dfile=android-jsc-${JSC_VERSION}.aar \
49
+        -Dpackaging=aar \
50
+        -DgeneratePom=false \
51
+        -DpomFile=android-jsc-${JSC_VERSION}.pom || true
52
+    popd
40
 else
53
 else
41
-    # Check if an SDK with that same version has already been released
42
-    if [[ -d ${MVN_REPO}/org/jitsi/react/jitsi-meet-sdk/${SDK_VERSION} ]]; then
43
-        echo "There is already a release with that version in the Maven repo!"
44
-        exit 1
45
-    fi
46
-
47
-    # First push React Native, if necessary
54
+    # Push React Native, if necessary
48
     if [[ ! -d ${MVN_REPO}/com/facebook/react/react-native/${RN_VERSION} ]]; then
55
     if [[ ! -d ${MVN_REPO}/com/facebook/react/react-native/${RN_VERSION} ]]; then
49
         echo "Pushing React Native ${RN_VERSION} to the Maven repo"
56
         echo "Pushing React Native ${RN_VERSION} to the Maven repo"
50
         pushd ${THIS_DIR}/../../node_modules/react-native/android/com/facebook/react/react-native/${RN_VERSION}
57
         pushd ${THIS_DIR}/../../node_modules/react-native/android/com/facebook/react/react-native/${RN_VERSION}
57
             -DpomFile=react-native-${RN_VERSION}.pom
64
             -DpomFile=react-native-${RN_VERSION}.pom
58
         popd
65
         popd
59
     fi
66
     fi
67
+
68
+    # Push JSC, if necessary
69
+    if [[ ! -d ${MVN_REPO}/org/webkit/android-jsc/${JSC_VERSION} ]]; then
70
+        echo "Pushing JSC ${JSC_VERSION} to the Maven repo"
71
+        pushd ${THIS_DIR}/../../node_modules/jsc-android/dist/org/webkit/android-jsc/${JSC_VERSION}
72
+        mvn \
73
+            deploy:deploy-file \
74
+            -Durl=${MVN_REPO} \
75
+            -Dfile=android-jsc-${JSC_VERSION}.aar \
76
+            -Dpackaging=aar \
77
+            -DgeneratePom=false \
78
+            -DpomFile=android-jsc-${JSC_VERSION}.pom
79
+        popd
80
+    fi
81
+
82
+    # Check if an SDK with that same version has already been released
83
+    if [[ -d ${MVN_REPO}/org/jitsi/react/jitsi-meet-sdk/${SDK_VERSION} ]]; then
84
+        echo "There is already a release with that version in the Maven repo!"
85
+        exit 1
86
+    fi
60
 fi
87
 fi
61
 
88
 
62
 # Now build and publish the Jitsi Meet SDK and its dependencies
89
 # Now build and publish the Jitsi Meet SDK and its dependencies

正在加载...
取消
保存