From 59d2cf20ec05e8464f293b432f79a9e821de7425 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 10 May 2023 20:30:01 +0200 Subject: [PATCH] Added optional version prefix --- README.md | 1 + plugin.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4e874c6..97c3dab 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Uses changelogen for changelog generation, is able to create gitea releases and * `MATRIX_USER`: The matrix user's username * `MATRIX_PASSWORD`: The matrix user's password * `MATRIX_ROOM`: The id of the notification matrix room (including the `!`) +* `VERSION_PREFIX`: Optional prefix for the messages title ## Examples diff --git a/plugin.sh b/plugin.sh index b444b15..a760bc8 100644 --- a/plugin.sh +++ b/plugin.sh @@ -28,7 +28,7 @@ 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 "# $CURRENTTAG \n $ALLCHANGES" | pandoc -f markdown -t html | sed 's/"/'"'"'/g' | xargs echo -n) +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