mirror of https://github.com/kami-blue/client
enh: Added safety to not ping updates role if changelog fails to upload
This commit is contained in:
parent
05f7959031
commit
9d20f1c306
|
@ -50,6 +50,14 @@ JAR_NAME="$("$_d"/scripts/buildJarSafe.sh)" || exit $?
|
|||
REPO="$KAMI_REPO_NIGHTLY"
|
||||
[ "$1" == "major" ] && REPO="$KAMI_REPO_MAJOR"
|
||||
|
||||
# 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" || {
|
||||
echo "[runAutomatedRelease] Failed to post changelog embed"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Send ping
|
||||
if [ -n "$KAMI_UPDATES_ROLE_ID" ]; then
|
||||
curl -X POST \
|
||||
|
@ -57,7 +65,3 @@ if [ -n "$KAMI_UPDATES_ROLE_ID" ]; then
|
|||
-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