diff --git a/plugin.sh b/plugin.sh index 54c1ec6..5a5df5d 100644 --- a/plugin.sh +++ b/plugin.sh @@ -1,13 +1,18 @@ #!/bin/sh -set -euo pipefail +echo "Starting release script" CURRENTTAG=$(git tag --sort=-creatordate | head -n 1) PREVIOUSTAG=$(git tag --sort=-creatordate | head -n 2 | tail -n 1) echo "Diff: $PREVIOUSTAG..$CURRENTTAG" +echo "Generating changelog..." ALLCHANGES=$(npx -y @philippdormann/changelogen@1.0.0 --from $PREVIOUSTAG --to $CURRENTTAG --no-output | sed 's/"/\\"/g' | tail -n +6) +echo "Changelog: $ALLCHANGES" + if [ "${PLUGIN_GITEA_DOMAIN:+set}" = set ]; then + echo "Detected gitea domain, creating release"; + if [ "${PLUGIN_GITEA_APIKEY:-null}" = null ]; then echo "No api key provided"; exit 1; @@ -39,6 +44,8 @@ if [ "${PLUGIN_GITEA_DOMAIN:+set}" = set ]; then fi if [ "${PLUGIN_MATRIX_SERVER:+set}" = set ]; then + echo "Detected matrix server, sending notification"; + echo "Detected matrix server"; if [ "${PLUGIN_MATRIX_USER:-null}" = null ]; then echo "No matrix username provided";