@b4n commented on this pull request.
if [ -z "${PATCH}" ] || [ "${PATCH}" = "0" ]; then
- MINOR="$((MINOR-1))" - PATCH="90" + if [[ "${MINOR}" = "0" && (-z "${PATCH}" || "${PATCH}" = "0") ]]; then + MAJOR="$((MAJOR-1))" + MINOR="99" + PATCH="99" else - PATCH="$((PATCH-1))" + if [[ -z "${PATCH}" || "${PATCH}" = "0" ]]; then + MINOR="$((MINOR-1))" + PATCH="99" + else + PATCH="$((PATCH-1))" + fi fi
Isn't this a simpler version of the exact same thing? ```bash
if [ -z "${PATCH}" ] || [ "${PATCH}" = "0" ]; then if [ "${MINOR}" = "0" ]; then MAJOR="$((MAJOR-1))" MINOR="99" else MINOR="$((MINOR-1))" fi PATCH="99" else PATCH="$((PATCH-1))" fi ```