Nagram/bin/upload_release.sh

40 lines
656 B
Bash
Raw Normal View History

2020-09-14 04:25:40 +00:00
#!/bin/bash
2020-10-04 10:14:58 +00:00
trap 'kill $(jobs -p)' SIGINT
function upload() {
2020-09-14 04:25:40 +00:00
for apk in $outPath/*.apk; do
echo ">> Uploading $apk"
curl https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendDocument \
-X POST \
-F chat_id="$TELEGRAM_CHANNEL" \
-F document="@$apk" \
2020-10-04 10:14:58 +00:00
--silent --show-error --fail >/dev/null &
done
2020-09-14 04:25:40 +00:00
2020-10-04 10:14:58 +00:00
for job in $(jobs -p); do
wait $job
2020-09-14 04:25:40 +00:00
done
}
outPath="TMessagesProj/build/outputs/apk/full/release"
upload
outPath="TMessagesProj/build/outputs/apk/full/releaseNoGcm"
2020-09-23 16:13:09 +00:00
upload
outPath="TMessagesProj/build/outputs/apk/mini/release"
upload
outPath="TMessagesProj/build/outputs/apk/mini/releaseNoGcm"
2020-10-04 10:14:58 +00:00
upload