From a8149dfce9eceb26ff7cd207e651ad25ec78f6b8 Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Tue, 13 Mar 2018 06:09:52 +0100 Subject: [PATCH] deploy_beta.sh: Fixed a line causing the script to wait for STDIN (don't really understand, why) and modified the "this is just for testing, backup your data" warning. --- deploy_beta.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/deploy_beta.sh b/deploy_beta.sh index 747b846..1466c51 100755 --- a/deploy_beta.sh +++ b/deploy_beta.sh @@ -23,8 +23,13 @@ filename="telegram_backup.beta_${version}.jar" cp --no-preserve "mode,ownership,timestamps" build/libs/telegram_backup.jar /data/containers/nginx/www/files/${filename} echo "Notifying the Telegram group..." -release_notes=$(sed 's/\* /• /' | sed 's/&/&/g' | sed 's//\>/g' <<< "$release_notes") -message="New beta release $version"$'\n'$'\n'"This is a beta release. There may be bugs included that might destroy your data. Only use this beta release if you know what you're doing. AND MAKE A BACKUP BEFORE USING IT!"$'\n'$'\n'"$additional_notes"$'\n'"$release_notes"$'\n'$'\n'"https://files.fabianonline.de/${filename}" +release_notes=$(echo "$release_notes" | sed 's/\* /• /' | sed 's/&/&/g' | sed 's//\>/g') +message="New beta release $version"$'\n\n' +message="${message}${additional_notes}"$'\n\n' +message="${message}${release_notes}"$'\n\n' +message="${message}This is a release for testing purposes only. There may be bugs included that might destroy your data. Only use this beta release if you know what you're doing. AND MAKE A BACKUP OF YOUR BACKUP BEFORE USING IT!"$'\n\n' +message="${message}Please report back if you used this release and encountered a bug. Also report back, if you used it and IT WORKED, please. Thank you."$'\n\n' +message="${message}https://files.fabianonline.de/${filename}" result=$(curl https://api.telegram.org/bot${BOT_TOKEN}/sendMessage -XPOST --form "text=<-" --form-string "chat_id=${CHAT_ID}" --form-string "parse_mode=HTML" --form-string "disable_web_page_preview=true" <<< "$message") message_id=$(jq -r '.result.message_id' <<< "$result")