Mercurial > repos > blastem
diff build_upload_nightly @ 2053:3414a4423de1 segacd
Merge from default
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 15 Jan 2022 13:15:21 -0800 |
parents | 2efdace4fb8a |
children |
line wrap: on
line diff
--- a/build_upload_nightly Sat Jan 05 00:58:08 2019 -0800 +++ b/build_upload_nightly Sat Jan 15 13:15:21 2022 -0800 @@ -14,6 +14,20 @@ if [ $result -ne 0 ]; then echo Build falied with return code $result stopping $CONTAINER_NAME lxc-stop -n "$CONTAINER_NAME" + curdate=`date -Iseconds` + curl -d'@-' -H 'Content-Type: application/json' "$WEBHOOKURL" <<WEBHOOKEOF +{ + "embeds": [ + { + "title": "Build $name failed!", + "type": "rich", + "description": "Build falied with return code $result stopping $CONTAINER_NAME", + "timestamp": "$curdate", + "color": 16711680 + } + ] +} +WEBHOOKEOF exit $result fi echo "Build succeeded, stopping $CONTAINER_NAME" @@ -23,3 +37,25 @@ echo "Uploaing $artifact to $REMOTE_HOST" scp -i "$REMOTE_IDENT" "$HOME/.local/share/lxc/$CONTAINER_NAME/rootfs/home/$BUILD_USER/blastem/$artifact" $REMOTE_USER@$REMOTE_HOST:/home/$REMOTE_USER/nightlies echo "Done" +curdate=`date -Iseconds` +version=`echo "$artifact" | sed -E 's/[^-]+-([0-9]+\.[0-9]+\.[0-9]+[^.]*)\..*$/\1/'` +curl -d'@-' -H 'Content-Type: application/json' "$WEBHOOKURL" <<WEBHOOKEOF +{ + "embeds": [ + { + "title": "$artifact", + "type": "rich", + "url": "https://www.retrodev.com/blastem/nightlies/$artifact", + "description": "New build of $name succeeded!", + "timestamp": "$curdate", + "color": 65280, + "fields": [ + { + "name": "Version", + "value": "$version" + } + ] + } + ] +} +WEBHOOKEOF \ No newline at end of file