From 97df9f5595693f2d7b2841e33e1fa97a44985fbb Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Fri, 12 May 2023 12:38:48 +0200 Subject: [PATCH] feat(api): Fail on curl server fails --- plugin.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin.sh b/plugin.sh index ba9a023..6478546 100644 --- a/plugin.sh +++ b/plugin.sh @@ -50,6 +50,7 @@ if [ "${PLUGIN_GITEA_DOMAIN:+set}" = set ]; then --url "https://$PLUGIN_GITEA_DOMAIN/api/v1/repos/$PLUGIN_REPO/releases" \ --header "Content-Type: application/json" \ --header "Authorization: token $PLUGIN_GITEA_APIKEY" \ + -f \ --data "{ \"name\": \"$CURRENTTAG\", \"body\": \"$ALLCHANGES\", @@ -77,6 +78,7 @@ if [ "${PLUGIN_MATRIX_SERVER:+set}" = set ]; then MATRIX_LOGIN=$(curl --request POST \ --url "https://$PLUGIN_MATRIX_SERVER/_matrix/client/r0/login" \ --header "Content-Type: application/json" \ + -f \ --data "{ \"type\": \"m.login.password\", \"user\": \"$PLUGIN_MATRIX_USER\", @@ -93,6 +95,7 @@ if [ "${PLUGIN_MATRIX_SERVER:+set}" = set ]; then curl --request POST \ --url "https://$PLUGIN_MATRIX_SERVER/_matrix/client/r0/rooms/$PLUGIN_MATRIX_ROOM/send/m.room.message?access_token=$MATRIX_TOKEN" \ --header "Content-Type: application/json" \ + -f \ --data "{ \"msgtype\": \"m.text\", \"body\": \"$(echo "# $PLUGIN_VERSION_PREFIX$CURRENTTAG \n $ALLCHANGES" | xargs echo -n)\",