Skip to content

Commit

Permalink
Update kuper and publish apk script
Browse files Browse the repository at this point in the history
  • Loading branch information
jahirfiquitiva committed Nov 22, 2020
1 parent 96e3dab commit 1f5d443
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 21 deletions.
4 changes: 2 additions & 2 deletions buildSrc/src/main/java/Blueprint.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

object Blueprint {
const val appId = "dev.jahir.blueprint.app"
const val version = 215
const val versionName = "2.1.5"
const val version = 216
const val versionName = "2.1.6"
}
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ object Versions {
const val buildTools = "30.0.0"

// Kuper
const val kuper = "2.2.5"
const val kuper = "2.2.6"

// Adaptive Icons
const val adaptiveIcons = "a0884c7"
Expand Down
26 changes: 8 additions & 18 deletions publish_apk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,28 +51,18 @@ if [ "$TRAVIS_PULL_REQUEST" = false ]; then

if [[ ! -z "$url" && "$url" != " " && "$url" != "null" ]]; then
printf "\nAPK url: $url"
message=$"*New ${repoName} update available! (${releaseName})* 🚀${ln}${ln}*Changes:*${ln}${changes}"
btns=$"{\"inline_keyboard\":[[{\"text\":\"How to update\",\"url\":\"https://github.com/${TRAVIS_REPO_SLUG}/wiki/How-to-update\"}],[{\"text\":\"Download sample APK\",\"url\":\"${url}\"}],[{\"text\":\"Donate\",\"url\":\"https://jahir.dev/donate\"}]]}"

printf "\n\nSending message to Telegram channel…\n"
telegramUrl="https://api.telegram.org/bot${TEL_BOT_KEY}/sendMessage?chat_id=@JFsDashSupport&text=${message}&parse_mode=Markdown&reply_markup=${btns}"
echo "Telegram url: ${telegramUrl}"
printf "\n\n"
curl -g "${telegramUrl}"

printf "\n\nSending message to Discord channel…\n"
messageBody="**Changes:**\n$defaultChanges"
messageBody+="\n\n**Useful links:**"
messageBody+="\n* [How to update?](https://github.com/jahirfiquitiva/$repoName/wiki/How-to-update)"
messageBody+="\n* [Download sample APK]("
messageBody+="$url"
messageBody+=")\n* [Donate & support future development](https://jahir.dev/donate)"
echo $messageBody
curl -X POST -H 'Content-Type: application/json' -d '{ "embeds": [{ "title": "**New update available! ('"$releaseName"')** 🚀", "description": "'"$messageBody"'", "color": 15844367 }] }' $UPDATE_DISCORD_WEBHOOK
message="**Changes:**\n$defaultChanges"
message+="\n\n**Useful links:**"
message+="\n* [How to update?](https://github.com/jahirfiquitiva/$repoName/wiki/How-to-update)"
message+="\n* [Download sample APK]("
message+="$url"
message+=")\n* [Donate & support future development](https://jahir.dev/donate)"
curl -X POST -H 'Content-Type: application/json' -d '{ "embeds": [{ "title": "**New update available! ('"$releaseName"')** 🚀", "description": "'"$message"'", "color": 15844367 }] }' $UPDATE_DISCORD_WEBHOOK

printf "\n\nFinished uploading APK(s) and sending notifications\n"
else
printf "\n\nSkipping Telegram report because no file was uploaded\n"
printf "\n\nSkipping notifications because no file was uploaded\n"
fi
done
else
Expand Down

0 comments on commit 1f5d443

Please sign in to comment.