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:
@ -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/&/&/g' | sed 's/</\</g' | sed 's/>/\>/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"
|
||||
|
||||
|
Reference in New Issue
Block a user