Nagram/bin/app/build.sh

23 lines
425 B
Bash
Raw Normal View History

2021-01-17 04:52:39 +00:00
#!/bin/bash
trap 'kill $(jobs -p)' SIGINT
function upload() {
for apk in TMessagesProj/build/outputs/apk/$1/*.apk; do
echo ">> Uploading $apk"
curl https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendDocument \
-X POST \
-F chat_id="$TELEGRAM_CHANNEL" \
-F document="@$apk" \
--silent --show-error --fail >/dev/null &
done
for job in $(jobs -p); do
wait $job || exit 1
done
}