Skip to content

Commit

Permalink
build: Unify download messages
Browse files Browse the repository at this point in the history
Signed-off-by: Jarl-Penguin <jarlpenguin@outlook.com>
  • Loading branch information
JarlPenguin committed Jun 27, 2023
1 parent 323c47c commit 8a220c7
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,32 +106,11 @@ Date: $(env TZ="${timezone}" date)" "${img_path}"
fi
echo "Uploaded"

if [ "${upload_recovery}" == "true" ]; then
if [ "${old_target_files_exists}" == "true" ]; then
telegram -M "Build completed successfully in $((BUILD_DIFF / 60)) minute(s) and $((BUILD_DIFF % 60)) seconds
Download ROM: ["${zip_name}"]("https://github.com/${release_repo}/releases/tag/${tag}")
Download incremental update: ["incremental_ota_update.zip"]("https://github.com/${release_repo}/releases/download/${tag}/incremental_ota_update.zip")
Download recovery: ["recovery.img"]("https://github.com/${release_repo}/releases/download/${tag}/recovery.img")"
else
telegram -M "Build completed successfully in $((BUILD_DIFF / 60)) minute(s) and $((BUILD_DIFF % 60)) seconds
Download ROM: ["${zip_name}"]("https://github.com/${release_repo}/releases/tag/${tag}")
Download recovery: ["recovery.img"]("https://github.com/${release_repo}/releases/download/${tag}/recovery.img")"
fi
else
if [ "${old_target_files_exists}" == "true" ]; then
telegram -M "Build completed successfully in $((BUILD_DIFF / 60)) minute(s) and $((BUILD_DIFF % 60)) seconds
telegram -M "Build completed successfully in $((BUILD_DIFF / 60)) minute(s) and $((BUILD_DIFF % 60)) seconds
Download: ["${zip_name}"]("https://github.com/${release_repo}/releases/tag/${tag}")
Download incremental update: ["incremental_ota_update.zip"]("https://github.com/${release_repo}/releases/download/${tag}/incremental_ota_update.zip")"
else
telegram -M "Build completed successfully in $((BUILD_DIFF / 60)) minute(s) and $((BUILD_DIFF % 60)) seconds
Download: ["${tag}"]("https://github.com/${release_repo}/releases/tag/${tag}")"

Download: ["${zip_name}"]("https://github.com/${release_repo}/releases/tag/${tag}")
fi
fi
curl --data parse_mode=HTML --data chat_id=$TELEGRAM_CHAT --data sticker=CAADBQADGgEAAixuhBPbSa3YLUZ8DBYE --request POST https://api.telegram.org/bot$TELEGRAM_TOKEN/sendSticker
curl --data parse_mode=HTML --data chat_id=$TELEGRAM_CHAT --data sticker=CAADBQADGgEAAixuhBPbSa3YLUZ8DBYE --request POST https://api.telegram.org/bot$TELEGRAM_TOKEN/sendSticker

else
echo "Build failed in $((BUILD_DIFF / 60)) minute(s) and $((BUILD_DIFF % 60)) seconds"
Expand Down

0 comments on commit 8a220c7

Please sign in to comment.