From 3613117b9573798b17f1535cfa9e4b4973f6c4d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Wed, 11 Oct 2023 23:10:25 +0200 Subject: [PATCH] Use b4n's simpler version --- build/ci_mingw64_geany_plugins.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/build/ci_mingw64_geany_plugins.sh b/build/ci_mingw64_geany_plugins.sh index 8086ec817..2409d7d2a 100644 --- a/build/ci_mingw64_geany_plugins.sh +++ b/build/ci_mingw64_geany_plugins.sh @@ -147,17 +147,16 @@ patch_version_information() { MAJOR="${BASH_REMATCH[1]}" MINOR="${BASH_REMATCH[2]}" PATCH="${BASH_REMATCH[4]}" - if [[ "${MINOR}" = "0" && (-z "${PATCH}" || "${PATCH}" = "0") ]]; then - MAJOR="$((MAJOR-1))" - MINOR="99" - PATCH="99" - else - if [[ -z "${PATCH}" || "${PATCH}" = "0" ]]; then - MINOR="$((MINOR-1))" - PATCH="99" + if [ -z "${PATCH}" ] || [ "${PATCH}" = "0" ]; then + if [ "${MINOR}" = "0" ]; then + MAJOR="$((MAJOR-1))" + MINOR="99" else - PATCH="$((PATCH-1))" + MINOR="$((MINOR-1))" fi + PATCH="99" + else + PATCH="$((PATCH-1))" fi else echo "Could not extract or parse version tag" >&2