diff options
author | Michael Pavone <pavone@retrodev.com> | 2019-03-25 23:34:52 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2019-03-25 23:34:52 -0700 |
commit | 7193ef551b23dce5206acfb44a81e19a6b968f89 (patch) | |
tree | 17e6fb6e587eed4d31db91ca4380bb9cc8eeed26 | |
parent | 321db7dd21f1f1621af35cdeec48a86d666adbe4 (diff) |
Fix and update JSON payload for webhook in build scripts
-rwxr-xr-x | build_upload_nightly | 16 | ||||
-rwxr-xr-x | build_upload_win_nightly | 16 |
2 files changed, 22 insertions, 10 deletions
diff --git a/build_upload_nightly b/build_upload_nightly index 22a5d0f..8077ed1 100755 --- a/build_upload_nightly +++ b/build_upload_nightly @@ -21,9 +21,9 @@ if [ $result -ne 0 ]; then { "title": "Build $name failed!", "type": "rich", - "description": "Build falied with return code $result stopping $CONTAINER_NAME" + "description": "Build falied with return code $result stopping $CONTAINER_NAME", "timestamp": "$curdate", - "color": 16711680, + "color": 16711680 } ] } @@ -43,12 +43,18 @@ curl -d'@-' -H 'Content-Type: application/json' "$WEBHOOKURL" <<WEBHOOKEOF { "embeds": [ { - "title": "New build of $name succeeded!", + "title": "$artifact", "type": "rich", - "url": "https://www.retrodev.com/blastem/nightlies/$artifact" - "description": "Version: $version" + "url": "https://www.retrodev.com/blastem/nightlies/$artifact", + "description": "New build of $name succeeded!", "timestamp": "$curdate", "color": 65280, + "fields": [ + { + "name": "Version", + "value": "$version" + } + ] } ] } diff --git a/build_upload_win_nightly b/build_upload_win_nightly index 1edc00b..b054b3b 100755 --- a/build_upload_win_nightly +++ b/build_upload_win_nightly @@ -19,9 +19,9 @@ if [ $result -ne 0 ]; then { "title": "Build $name failed!", "type": "rich", - "description": "Build falied with return code $result" + "description": "Build falied with return code $result", "timestamp": "$curdate", - "color": 16711680, + "color": 16711680 } ] } @@ -38,12 +38,18 @@ curl -d'@-' -H 'Content-Type: application/json' "$WEBHOOKURL" <<WEBHOOKEOF { "embeds": [ { - "title": "New build of $name succeeded!", + "title": "$artifact", "type": "rich", - "url": "https://www.retrodev.com/blastem/nightlies/$artifact" - "description": "Version: $version" + "url": "https://www.retrodev.com/blastem/nightlies/$artifact", + "description": "New build of $name succeeded!", "timestamp": "$curdate", "color": 65280, + "fields": [ + { + "name": "Version", + "value": "$version" + } + ] } ] } |