forked from RepoMirrors/kami-blue
use embeds and add more information for hook
This commit is contained in:
parent
37861c375f
commit
6fbe1c6a96
|
@ -2,9 +2,12 @@
|
|||
|
||||
if [[ "$TRAVIS_PULL_REQUEST" == "true" ]]; then exit 0; else echo "">/dev/null; fi
|
||||
|
||||
COMMIT_TRIM="${TRAVIS_COMMIT::7}"
|
||||
COMMIT_MSG="$TRAVIS_COMMIT_MESSAGE"
|
||||
|
||||
if [[ "$BRANCH" == "feature/master" ]]; then
|
||||
# Send message with branch name
|
||||
curl -H "Content-Type: application/json" -X POST -d '{"username": "KAMI Blue Releases", "content": "**Branch:** `'$BRANCH'`"}' "$WEBHOOK"
|
||||
curl -H "Content-Type: application/json" -X POST -d '{"embeds": [{"title": "","description": "**Changelog:** '"$COMMIT_MSG"'\nBranch: `'"$BRANCH"'`\nCommit: ['${COMMIT_TRIM}'](https://github.com/S-B99/kamiblue/commits/'${COMMIT_TRIM}')"}]}' "$WEBHOOK"
|
||||
|
||||
# Upload the release file
|
||||
BUILD_DIR="$(readlink -f ./build/libs/)"
|
||||
|
@ -12,7 +15,7 @@ if [[ "$BRANCH" == "feature/master" ]]; then
|
|||
curl -F content=@"$BUILD_DIR/$JAR_DIR" "$WEBHOOK"
|
||||
elif [[ "$BRANCH" == "feature/safecrystal#480" ]]; then
|
||||
# Send message with branch name
|
||||
curl -H "Content-Type: application/json" -X POST -d '{"username": "KAMI Blue Releases", "content": "**Branch:** `'$BRANCH'`"}' "$WEBHOOK"
|
||||
curl -H "Content-Type: application/json" -X POST -d '{"embeds": [{"title": "","description": "**Changelog:** '"$COMMIT_MSG"'\nBranch: `'"$BRANCH"'`\nCommit: ['${COMMIT_TRIM}'](https://github.com/S-B99/kamiblue/commits/'${COMMIT_TRIM}')"}]}' "$WEBHOOK"
|
||||
|
||||
# Upload the release file
|
||||
BUILD_DIR="$(readlink -f ./build/libs/)"
|
||||
|
|
Loading…
Reference in New Issue