From 0da154e61ea941e957032f100c33e3c19c6bfdb4 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 10 May 2023 20:36:34 +0200 Subject: [PATCH] Moved formatted generation down --- plugin.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugin.sh b/plugin.sh index 46f3850..fe4ddee 100644 --- a/plugin.sh +++ b/plugin.sh @@ -28,8 +28,6 @@ git fetch --tags CURRENTTAG=$(git tag --sort=-taggerdate | head -n 1) PREVIOUSTAG=$(git tag --sort=-taggerdate | head -n 2 | tail -n 1) ALLCHANGES=$(npx -y @philippdormann/changelogen@latest --from $PREVIOUSTAG --to $CURRENTTAG --no-output | sed 's/"/\\"/g' | tail -n +6) -FORMATTED_CHANGES=$(echo "# $PLUGIN_VERSION_PREFIX$CURRENTTAG \n $ALLCHANGES" | pandoc -f markdown -t html | sed 's/"/'"'"'/g' | xargs echo -n) - if [ "${PLUGIN_GITEA_DOMAIN:+set}" = set ]; then if [ "${PLUGIN_GITEA_APIKEY:-null}" = null ]; then @@ -77,6 +75,7 @@ if [ "${PLUGIN_MATRIX_SERVER:+set}" = set ]; then \"password\": \"$PLUGIN_MATRIX_PASSWORD\" }") MATRIX_TOKEN=$(echo $MATRIX_LOGIN | jq .access_token | sed 's/"//g' ) + FORMATTED_CHANGES=$(echo "# $PLUGIN_VERSION_PREFIX$CURRENTTAG \n $ALLCHANGES" | pandoc -f markdown -t html | sed 's/"/'"'"'/g' | xargs echo -n) 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" \