forked from SchildiChat/schildichat-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
merge_upstream.sh
executable file
·58 lines (41 loc) · 1010 Bytes
/
merge_upstream.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
set -e
mydir="$(dirname "$(realpath "$0")")"
pushd "$mydir" > /dev/null
source ./merge_helpers.sh
# Check branch
check_branch $branch
forall_repos check_branch $branch
# Ensure clean git state
forall_repos check_clean_git
# Fetch upstream
forall_repos git fetch upstream
# Automatic reversions
automatic_i18n_reversion
automatic_packagejson_reversion
# Merge upstream
# Check if specific version to merge passed
if [ -z "$1" ]; then
get_latest_upstream_tag
else
latest_upstream_tag="$1"
fi
forelement_repos git merge "$latest_upstream_tag"
get_current_mxsdk_tags
pushd "matrix-js-sdk" > /dev/null
git merge "$current_mxjssdk_tag"
popd > /dev/null
pushd "matrix-react-sdk" > /dev/null
git merge "$current_mxreactsdk_tag"
popd > /dev/null
# Refresh environment
make clean
make setup
# Automatic adjustments
automatic_i18n_adjustment
automatic_packagejson_adjustment
# Automatic theme update
pushd "matrix-react-sdk" > /dev/null
./theme.sh y
popd > /dev/null
popd > /dev/null