mirror of
https://github.com/fabianonline/telegram_backup.git
synced 2024-12-25 22:35:35 +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:
parent
c963a8f334
commit
28b402d3ab
@ -43,6 +43,9 @@ git tag -a "$VERSION" -m "Version $VERSION" || error
|
|||||||
echo "Building it..."
|
echo "Building it..."
|
||||||
gradle build || error "Build failed. What did you do?!"
|
gradle build || error "Build failed. What did you do?!"
|
||||||
|
|
||||||
|
echo "Getting git stats..."
|
||||||
|
git_stats=$(git diff --shortstat stable..)
|
||||||
|
|
||||||
echo "Checking out stable..."
|
echo "Checking out stable..."
|
||||||
git checkout stable || error
|
git checkout stable || error
|
||||||
|
|
||||||
@ -77,7 +80,7 @@ docker push fabianonline/telegram_backup
|
|||||||
|
|
||||||
echo "Notifying the Telegram group..."
|
echo "Notifying the Telegram group..."
|
||||||
release_notes=$(sed 's/\* /• /' | sed 's/&/&/g' | sed 's/</\</g' | sed 's/>/\>/g' <<< "$release_notes")
|
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"
|
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"
|
||||||
|
|
||||||
|
@ -18,13 +18,17 @@ additional_notes="$(cat)"
|
|||||||
echo "Building it..."
|
echo "Building it..."
|
||||||
gradle build || error "Build failed. What did you do?!"
|
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..."
|
echo "Copying it to files.fabianonline.de..."
|
||||||
filename="telegram_backup.beta_${version}.jar"
|
filename="telegram_backup.beta_${version}.jar"
|
||||||
cp --no-preserve "mode,ownership,timestamps" build/libs/telegram_backup.jar /data/containers/nginx/www/files/${filename}
|
cp --no-preserve "mode,ownership,timestamps" build/libs/telegram_backup.jar /data/containers/nginx/www/files/${filename}
|
||||||
|
|
||||||
echo "Notifying the Telegram group..."
|
echo "Notifying the Telegram group..."
|
||||||
release_notes=$(echo "$release_notes" | sed 's/\* /• /' | sed 's/&/&/g' | sed 's/</\</g' | sed 's/>/\>/g')
|
release_notes=$(echo "$release_notes" | sed 's/\* /• /' | sed 's/&/&/g' | sed 's/</\</g' | sed 's/>/\>/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}${additional_notes}"$'\n\n'
|
||||||
message="${message}Changes since the last <i>real</i> release:"$'\n'"${release_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'
|
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'
|
||||||
|
Loading…
Reference in New Issue
Block a user