-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·47 lines (35 loc) · 1.11 KB
/
build.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
#!/usr/bin/env bash
set -eu
if [ -n "$RELEASE_KEYSTORE" ]; then
echo "Writing keystore"
echo "$RELEASE_KEYSTORE" | base64 -d > kitctf_chat.keystore
fi
if [ -d mattermost-mobile ]; then
rm -rf mattermost-mobile
fi
git clone https://github.com/mattermost/mattermost-mobile
pushd mattermost-mobile || exit 1
# Setup config for git am
git config --global user.email "[email protected]"
git config --global user.name "KITCTF Mattermost patcher"
if [ -n "$TARGET_REV" ]; then
git checkout "$TARGET_REV"
fi
for patch in ../*.patch; do
echo "Applying $patch"
git am "$patch"
done
npm install
pushd fastlane || exit 2
bundle install
popd || exit 2
{
echo "MATTERMOST_RELEASE_STORE_FILE=$PWD/../kitctf_chat.keystore";
echo "MATTERMOST_RELEASE_KEY_ALIAS=kitctf_chat" >> android/gradle.properties;
echo "MATTERMOST_RELEASE_PASSWORD=${RELEASE_PASSWORD}";
} >> android/gradle.properties
sed -i 's/-Xmx2048m/-Xmx4096m/' android/gradle.properties
sed -i 's/=512m/=1024m/' android/gradle.properties
cd fastlane
NODE_ENV=production bundle exec fastlane android build --env android.release
popd || exit