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

@ -18,13 +18,17 @@ additional_notes="$(cat)"
echo "Building it..."
gradle build || error "Build failed. What did you do?!"
echo "Getting git stats..."
git_stats=$(git diff --shortstat stable..)
echo "Copying it to files.fabianonline.de..."
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=$(echo "$release_notes" | sed 's/\* /• /' | sed 's/&/&amp;/g' | sed 's/</\&lt;/g' | sed 's/>/\&gt;/g')
message="<b>New beta release $version</b>"$'\n\n'
message="<b>New beta release $version</b>"$'\n'
message="${message}${git_stats}"$'\n\n'
message="${message}${additional_notes}"$'\n\n'
message="${message}Changes since the last <i>real</i> release:"$'\n'"${release_notes}"$'\n\n'
message="${message}<b>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!</b>"$'\n\n'