<commit_before>#!/usr/bin/env bash

command -v zenity >/dev/null 2>&1 || { echo >&2 "Release Generator requires zenity. Aborting."; exit 1; }

set -e

CHECK_IF_CLEAN ()
{
    if [[ -n $(git status --porcelain) ]]; then
        echo "Working Directory is not clean"
        exit 1
    fi
}

GET_CURRENT_VERSION ()
{
    CURRENT_VERSION=`cat "README.md" | grep 'Current Version: ' | sed 's/[^0-9\.]//g'`
}

DO_MAJOR ()
{
    a=( ${CURRENT_VERSION//./ } )
    O=${a[0]}
    O=$((O+1))
    NEW_VERSION="$O.${a[1]}.${a[2]}"
}

DO_MINOR ()
{
    a=( ${CURRENT_VERSION//./ } )
    O=${a[1]}
    O=$((O+1))
    NEW_VERSION="${a[0]}.$O.${a[2]}"
}

DO_PATCH ()
{
    a=( ${CURRENT_VERSION//./ } )
    O=${a[2]}
    O=$((O+1))
    NEW_VERSION="${a[0]}.${a[1]}.$O"
}

START_GIT_FLOW ()
{
    echo "Bring Master Up to date"
    git checkout -B master origin/master
    git flow release start $NEW_VERSION
}<commit_msg>Fixed release script again. Maybe I will get this right eventually<commit_after>#!/usr/bin/env bash

command -v zenity >/dev/null 2>&1 || { echo >&2 "Release Generator requires zenity. Aborting."; exit 1; }

set -e

CHECK_IF_CLEAN ()
{
    if [[ -n $(git status --porcelain) ]]; then
        echo "Working Directory is not clean"
        exit 1
    fi
}

GET_CURRENT_VERSION ()
{
    CURRENT_VERSION=`cat "README.md" | grep 'Current Version: ' | sed 's/[^0-9\.]//g'`
}

DO_MAJOR ()
{
    a=( ${CURRENT_VERSION//./ } )
    O=${a[0]}
    O=$((O+1))
    NEW_VERSION="$O.0.0"
}

DO_MINOR ()
{
    a=( ${CURRENT_VERSION//./ } )
    O=${a[1]}
    O=$((O+1))
    NEW_VERSION="${a[0]}.$O.0"
}

DO_PATCH ()
{
    a=( ${CURRENT_VERSION//./ } )
    O=${a[2]}
    O=$((O+1))
    NEW_VERSION="${a[0]}.${a[1]}.$O"
}

START_GIT_FLOW ()
{
    echo "Bring Master Up to date"
    git checkout -B master origin/master
    git flow release start $NEW_VERSION
}
{'fraction_non_alphanumeric': 0.21788617886178863, 'fraction_numerical': 0.020596205962059622, 'mean_word_length': 2.7068273092369477, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1318271', 'n_tokens_mistral': 786, 'n_tokens_neox': 750, 'n_words': 164}