From a38c402037c3d0d078dc09c7f5d49cd3755b38fb Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 10 May 2023 19:42:04 +0200 Subject: [PATCH] fixed bach synatax error --- plugin.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/plugin.sh b/plugin.sh index 8d7f091..97eba98 100644 --- a/plugin.sh +++ b/plugin.sh @@ -8,14 +8,13 @@ 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) -echo $PLUGIN_GITEA_DOMAIN; -if [[ "${PLUGIN_GITEA_DOMAIN:-}" == "true" ]]; then - if [[ -n "${PLUGIN_GITEA_APIKEY:-}"]]; then +if [[ -n "$PLUGIN_GITEA_DOMAIN" ]]; then + if [[ -z "$PLUGIN_GITEA_APIKEY"]]; then echo "No api key provided"; exit 1; fi - if [[ -n "${PLUGIN_REPO:-}"]]; then + if [[ -z "$PLUGIN_REPO"]]; then PLUGIN_REPO=$CI_REPO_NAME fi @@ -30,16 +29,16 @@ if [[ "${PLUGIN_GITEA_DOMAIN:-}" == "true" ]]; then \"tag_name\": \"$CURRENTTAG\" }" fi -if [[ "${PLUGIN_MATRIX_SERVER:-}" == "true" ]]; then - if [[ -n "${PLUGIN_MATRIX_USER:-}"]]; then +if [[ -n "$PLUGIN_MATRIX_SERVER" ]]; then + if [[ -z "$PLUGIN_MATRIX_USER" ]]; then echo "No matrix username provided"; exit 3; fi - if [[ -n "${PLUGIN_MATRIX_PASSWORD:-}"]]; then + if [[ -z "$PLUGIN_MATRIX_PASSWORD" ]]; then echo "No matrix password provided"; exit 4; fi - if [[ -n "${PLUGIN_MATRIX_ROOM:-}"]]; then + if [[ -z "$PLUGIN_MATRIX_ROOM" ]]; then echo "No matrix room id provided"; exit 4; fi