|
@@ -14,37 +14,27 @@ if [[ "$BRANCH" != "master" ]]; then
|
14
|
14
|
fi
|
15
|
15
|
|
16
|
16
|
THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)
|
17
|
|
-PID=$$
|
18
|
|
-LJM_TMP="${TMPDIR:-/tmp}/ljm-${PID}"
|
19
|
17
|
|
20
|
18
|
pushd ${THIS_DIR}/..
|
21
|
|
-CURRENT_LJM_COMMIT=$(jq -r '.dependencies."lib-jitsi-meet"' package.json | cut -d "#" -f2)
|
|
19
|
+CURRENT_LJM_DEP=$(jq -r '.dependencies."lib-jitsi-meet"' package.json)
|
22
|
20
|
popd
|
23
|
21
|
|
24
|
|
-git clone --branch master --single-branch --bare https://github.com/jitsi/lib-jitsi-meet ${LJM_TMP}
|
|
22
|
+NEW_LJM_RELEASE=$(gh release list --limit 1 --repo jitsi/lib-jitsi-meet | awk {'print $1'})
|
|
23
|
+GH_LINK="https://github.com/jitsi/lib-jitsi-meet/releases/tag/${NEW_LJM_RELEASE}"
|
|
24
|
+LATEST_LJM_DEP="https://github.com/jitsi/lib-jitsi-meet/releases/download/${NEW_LJM_RELEASE}/lib-jitsi-meet.tgz"
|
25
|
25
|
|
26
|
|
-pushd ${LJM_TMP}
|
27
|
|
-LATEST_LJM_COMMIT=$(git rev-parse HEAD)
|
28
|
|
-LJM_COMMITS=$(git log --oneline --no-decorate --no-merges ${CURRENT_LJM_COMMIT}..HEAD --pretty=format:"%x2a%x20%s")
|
29
|
|
-popd
|
30
|
|
-
|
31
|
|
-if [[ "${CURRENT_LJM_COMMIT}" == "${LATEST_LJM_COMMIT}" ]]; then
|
|
26
|
+if [[ "${CURRENT_LJM_DEP}" == "${LATEST_LJM_DEP}" ]]; then
|
32
|
27
|
echo "No need to update, already on the latest commit!"
|
33
|
|
- rm -rf ${LJM_TMP}
|
34
|
28
|
exit 1
|
35
|
29
|
fi
|
36
|
30
|
|
37
|
|
-GH_LINK="https://github.com/jitsi/lib-jitsi-meet/compare/${CURRENT_LJM_COMMIT}...${LATEST_LJM_COMMIT}"
|
38
|
|
-
|
39
|
31
|
pushd ${THIS_DIR}/..
|
40
|
32
|
EPOCH=$(date +%s)
|
41
|
33
|
NEW_BRANCH="update-ljm-${EPOCH}"
|
42
|
34
|
git checkout -b ${NEW_BRANCH}
|
43
|
|
-npm install github:jitsi/lib-jitsi-meet#${LATEST_LJM_COMMIT}
|
|
35
|
+npm install ${LATEST_LJM_DEP}
|
44
|
36
|
git add package.json package-lock.json
|
45
|
|
-git commit -m "chore(deps) lib-jitsi-meet@latest" -m "${LJM_COMMITS}" -m "${GH_LINK}"
|
|
37
|
+git commit -m "chore(deps) lib-jitsi-meet@latest" -m "${GH_LINK}"
|
46
|
38
|
git push origin ${NEW_BRANCH}
|
47
|
39
|
gh pr create --repo jitsi/jitsi-meet --fill
|
48
|
40
|
popd
|
49
|
|
-
|
50
|
|
-rm -rf ${LJM_TMP}
|