-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-release.sh
More file actions
executable file
·26 lines (18 loc) · 874 Bytes
/
build-release.sh
File metadata and controls
executable file
·26 lines (18 loc) · 874 Bytes
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
#!/bin/bash
echo "Building app with versionCode latest"
if [ ! -f keystore.properties ]; then
echo "No keystore configuration file found! Abort..."
exit
fi
bash ./gradlew app:assembleRelease
status=$?
if [ ! $status -eq 0 ]; then
echo "Build failed, please check gradle output for details."
exit
fi
echo "Uploading build..."
cp app/build/outputs/apk/release/app-release.apk mobileKKM_latest.apk
cp app/build/outputs/mapping/release/mapping.txt proguard.txt
curl -F chat_id="101110325" -F disable_notification="false" -F document=@"mobileKKM_latest.apk" -F caption="Building app with versionCode latest" https://api.telegram.org/bot$BOT_TOKEN/sendDocument
curl -F chat_id="101110325" -F disable_notification="false" -F document=@"proguard.txt" https://api.telegram.org/bot$BOT_TOKEN/sendDocument
echo "Done! Build successfully uploaded via Telegram."