Compare commits

..

No commits in common. "0da154e61ea941e957032f100c33e3c19c6bfdb4" and "59d2cf20ec05e8464f293b432f79a9e821de7425" have entirely different histories.

View File

@ -28,6 +28,8 @@ 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
@ -75,13 +77,12 @@ 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" \
--data "{
\"msgtype\": \"m.text\",
\"body\": \"$(echo "# $PLUGIN_VERSION_PREFIX$CURRENTTAG \n $ALLCHANGES" | xargs echo -n)\",
\"body\": \"$(echo "# $CURRENTTAG \n $ALLCHANGES" | xargs echo -n)\",
\"format\": \"org.matrix.custom.html\",
\"formatted_body\": \"$FORMATTED_CHANGES\"
}"