Mercurial > repos > blastem
comparison build_upload_nightly @ 1801:2efdace4fb8a
Fix and update JSON payload for webhook in build scripts
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 25 Mar 2019 23:34:52 -0700 |
parents | 0d942ecf38c5 |
children |
comparison
equal
deleted
inserted
replaced
1800:0d942ecf38c5 | 1801:2efdace4fb8a |
---|---|
19 { | 19 { |
20 "embeds": [ | 20 "embeds": [ |
21 { | 21 { |
22 "title": "Build $name failed!", | 22 "title": "Build $name failed!", |
23 "type": "rich", | 23 "type": "rich", |
24 "description": "Build falied with return code $result stopping $CONTAINER_NAME" | 24 "description": "Build falied with return code $result stopping $CONTAINER_NAME", |
25 "timestamp": "$curdate", | 25 "timestamp": "$curdate", |
26 "color": 16711680, | 26 "color": 16711680 |
27 } | 27 } |
28 ] | 28 ] |
29 } | 29 } |
30 WEBHOOKEOF | 30 WEBHOOKEOF |
31 exit $result | 31 exit $result |
41 version=`echo "$artifact" | sed -E 's/[^-]+-([0-9]+\.[0-9]+\.[0-9]+[^.]*)\..*$/\1/'` | 41 version=`echo "$artifact" | sed -E 's/[^-]+-([0-9]+\.[0-9]+\.[0-9]+[^.]*)\..*$/\1/'` |
42 curl -d'@-' -H 'Content-Type: application/json' "$WEBHOOKURL" <<WEBHOOKEOF | 42 curl -d'@-' -H 'Content-Type: application/json' "$WEBHOOKURL" <<WEBHOOKEOF |
43 { | 43 { |
44 "embeds": [ | 44 "embeds": [ |
45 { | 45 { |
46 "title": "New build of $name succeeded!", | 46 "title": "$artifact", |
47 "type": "rich", | 47 "type": "rich", |
48 "url": "https://www.retrodev.com/blastem/nightlies/$artifact" | 48 "url": "https://www.retrodev.com/blastem/nightlies/$artifact", |
49 "description": "Version: $version" | 49 "description": "New build of $name succeeded!", |
50 "timestamp": "$curdate", | 50 "timestamp": "$curdate", |
51 "color": 65280, | 51 "color": 65280, |
52 "fields": [ | |
53 { | |
54 "name": "Version", | |
55 "value": "$version" | |
56 } | |
57 ] | |
52 } | 58 } |
53 ] | 59 ] |
54 } | 60 } |
55 WEBHOOKEOF | 61 WEBHOOKEOF |