mirror of
https://github.com/kami-blue/client
synced 2025-01-09 08:19:23 +00:00
[feature] Automatically ping for changelogs
Signed-off-by: Dominika <sokolov.dominika@gmail.com>
This commit is contained in:
parent
dd673b0058
commit
1b3bf6fc2d
@ -50,5 +50,14 @@ JAR_NAME="$("$_d"/scripts/buildNamed.sh)" || exit $?
|
||||
REPO="$KAMI_REPO_NIGHTLY"
|
||||
[ "$1" == "major" ] && REPO="$KAMI_REPO_MAJOR"
|
||||
|
||||
# Send ping
|
||||
if [ -n "$KAMI_UPDATES_ROLE_ID" ]; then
|
||||
curl -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"username": "", "content": "<@&'"$KAMI_UPDATES_ROLE_ID"'>"}' \
|
||||
"$KAMI_WEBHOOK"
|
||||
fi
|
||||
|
||||
# Send changelog embed
|
||||
curl -H "Content-Type: application/json" -X POST \
|
||||
-d '{"embeds": [{"title": "Download v'"$VERSION"'","color": 10195199,"description": "[**DOWNLOAD**](https://github.com/'"$KAMI_OWNER"'/'"$REPO"'/releases/download/'"$VERSION"'/'"$JAR_NAME"')\n\n**Changelog:** \n'"$CHANGELOG"'\n\nDiff: ['"$OLD_COMMIT"'...'"$HEAD"'](https://github.com/'"$KAMI_OWNER"'/'"$REPO"'/compare/'"$OLD_COMMIT"'...'"$HEAD"') "}]}' "$KAMI_WEBHOOK"
|
||||
|
Loading…
Reference in New Issue
Block a user