1
0
mirror of https://github.com/fabianonline/telegram_backup.git synced 2025-07-04 14:06:25 +00:00

deploy.sh and deploy_bet.sh will now print short git diff stats into the telegram group's message.

This commit is contained in:
2018-04-13 06:17:33 +02:00
parent c963a8f334
commit 28b402d3ab
2 changed files with 9 additions and 2 deletions

View File

@ -43,6 +43,9 @@ git tag -a "$VERSION" -m "Version $VERSION" || error
echo "Building it..."
gradle build || error "Build failed. What did you do?!"
echo "Getting git stats..."
git_stats=$(git diff --shortstat stable..)
echo "Checking out stable..."
git checkout stable || error
@ -77,7 +80,7 @@ docker push fabianonline/telegram_backup
echo "Notifying the Telegram group..."
release_notes=$(sed 's/\* /• /' | sed 's/&/&amp;/g' | sed 's/</\&lt;/g' | sed 's/>/\&gt;/g' <<< "$release_notes")
message="<b>Version $VERSION was just released</b>"$'\n'$'\n'"$release_notes"$'\n'$'\n'"$release_url"
message="<b>Version $VERSION was just released</b>"$'\n'"$git_stats"$'\n'$'\n'"$release_notes"$'\n'$'\n'"$release_url"
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"